From 476255433c683f019ea47780377ce2440c5471c2 Mon Sep 17 00:00:00 2001 From: emelinda Date: Tue, 9 Jun 2026 17:16:37 +0300 Subject: [PATCH] Add `failed-pod-cleanup` HelmRelease and kustomization resources for `brusnika-stage`. --- .../infrastructure/kustomization.yaml | 9 +++++++ .../patches/failed-pod-cleanup.yaml | 13 ++++++++++ .../base/kustomization.yaml | 5 ++++ .../failed-pod-cleanup/base/release.yaml | 26 +++++++++++++++++++ .../failed-pod-cleanup/kustomization.yaml | 6 +++++ infrastructure/kustomization.yaml | 1 + 6 files changed, 60 insertions(+) create mode 100644 clusters/brusnika-stage/infrastructure/patches/failed-pod-cleanup.yaml create mode 100644 infrastructure/failed-pod-cleanup/base/kustomization.yaml create mode 100644 infrastructure/failed-pod-cleanup/base/release.yaml create mode 100644 infrastructure/failed-pod-cleanup/kustomization.yaml diff --git a/clusters/brusnika-stage/infrastructure/kustomization.yaml b/clusters/brusnika-stage/infrastructure/kustomization.yaml index a8be92d..6d5b5bb 100644 --- a/clusters/brusnika-stage/infrastructure/kustomization.yaml +++ b/clusters/brusnika-stage/infrastructure/kustomization.yaml @@ -10,6 +10,7 @@ resources: - ./lb-service-override.yaml - ./vault-ingress.yaml - ./clusterissuer-letsencrypt.yaml + - ../../../infrastructure/failed-pod-cleanup patches: - path: ./patches/istio-gateway.yaml target: @@ -39,3 +40,11 @@ patches: kind: HelmRelease name: zitadel namespace: zitadel + + - path: ./patches/failed-pod-cleanup.yaml + target: + group: helm.toolkit.fluxcd.io + version: v2 + kind: HelmRelease + name: failed-pod-cleanup + namespace: default \ No newline at end of file diff --git a/clusters/brusnika-stage/infrastructure/patches/failed-pod-cleanup.yaml b/clusters/brusnika-stage/infrastructure/patches/failed-pod-cleanup.yaml new file mode 100644 index 0000000..ef71e6c --- /dev/null +++ b/clusters/brusnika-stage/infrastructure/patches/failed-pod-cleanup.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: failed-pod-cleanup + namespace: default +spec: + values: + cleanup: + schedule: + _default: "0 0 * * *" + image: + _default: "cr.yandex/crp3ccidau046kdj8g9q/kubectl:latest" diff --git a/infrastructure/failed-pod-cleanup/base/kustomization.yaml b/infrastructure/failed-pod-cleanup/base/kustomization.yaml new file mode 100644 index 0000000..d2d69ae --- /dev/null +++ b/infrastructure/failed-pod-cleanup/base/kustomization.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - release.yaml diff --git a/infrastructure/failed-pod-cleanup/base/release.yaml b/infrastructure/failed-pod-cleanup/base/release.yaml new file mode 100644 index 0000000..05a391d --- /dev/null +++ b/infrastructure/failed-pod-cleanup/base/release.yaml @@ -0,0 +1,26 @@ +--- +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: failed-pod-cleanup + namespace: default +spec: + interval: 5m + chart: + spec: + chart: failed-pod-cleanup + version: 0.1.3 + sourceRef: + kind: HelmRepository + name: sarex-oci + namespace: flux-system + install: + remediation: + retries: 1 + upgrade: + remediation: + retries: 1 + values: + cleanup: + schedule: + _default: "0 0 * * *" diff --git a/infrastructure/failed-pod-cleanup/kustomization.yaml b/infrastructure/failed-pod-cleanup/kustomization.yaml new file mode 100644 index 0000000..bce7a13 --- /dev/null +++ b/infrastructure/failed-pod-cleanup/kustomization.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./base + diff --git a/infrastructure/kustomization.yaml b/infrastructure/kustomization.yaml index aff4a77..e9e2fd0 100644 --- a/infrastructure/kustomization.yaml +++ b/infrastructure/kustomization.yaml @@ -5,6 +5,7 @@ resources: - camunda - cert-manager - dashboard + - failed-pod-cleanup - kafka - keycloak - local-path-provisioner