From 8046ec13aaa50bf667775541fbedfc5f9533f67e Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Mon, 15 Dec 2025 01:18:44 +0100 Subject: [PATCH] feat: Use single kustomization for all alerts --- clusters/testing/kustomization.yaml | 3 +-- .../{repo/alerts-repo.yaml => alerts.yaml} | 4 ++-- configs/alerts/kustomization.yaml | 5 +++++ configs/alerts/telegram/alerts-telegram.yaml | 19 ------------------- configs/artifacts.yaml | 9 ++------- 5 files changed, 10 insertions(+), 30 deletions(-) rename configs/alerts/{repo/alerts-repo.yaml => alerts.yaml} (87%) create mode 100644 configs/alerts/kustomization.yaml delete mode 100644 configs/alerts/telegram/alerts-telegram.yaml diff --git a/clusters/testing/kustomization.yaml b/clusters/testing/kustomization.yaml index 04bb595..0534bf9 100644 --- a/clusters/testing/kustomization.yaml +++ b/clusters/testing/kustomization.yaml @@ -13,6 +13,5 @@ resources: - ../../configs/artifacts.yaml - ../../configs/letsencrypt/letsencrypt.yaml - ../../configs/certificates/certificates.yaml - - ../../configs/alerts/telegram/alerts-telegram.yaml - - ../../configs/alerts/repo/alerts-repo.yaml + - ../../configs/alerts/alerts.yaml - ../../configs/longhorn-jobs/longhorn-jobs.yaml diff --git a/configs/alerts/repo/alerts-repo.yaml b/configs/alerts/alerts.yaml similarity index 87% rename from configs/alerts/repo/alerts-repo.yaml rename to configs/alerts/alerts.yaml index 368dd78..8284751 100644 --- a/configs/alerts/repo/alerts-repo.yaml +++ b/configs/alerts/alerts.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: alerts-repo + name: alerts namespace: flux-system spec: interval: 1h @@ -9,7 +9,7 @@ spec: timeout: 5m sourceRef: kind: ExternalArtifact - name: alerts-repo + name: alerts decryption: provider: sops secretRef: diff --git a/configs/alerts/kustomization.yaml b/configs/alerts/kustomization.yaml new file mode 100644 index 0000000..4888e69 --- /dev/null +++ b/configs/alerts/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - telegram + - repo diff --git a/configs/alerts/telegram/alerts-telegram.yaml b/configs/alerts/telegram/alerts-telegram.yaml deleted file mode 100644 index 9a64a5f..0000000 --- a/configs/alerts/telegram/alerts-telegram.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: kustomize.toolkit.fluxcd.io/v1 -kind: Kustomization -metadata: - name: alerts-telegram - namespace: flux-system -spec: - interval: 1h - retryInterval: 2m - timeout: 5m - sourceRef: - kind: ExternalArtifact - name: alerts-telegram - decryption: - provider: sops - secretRef: - name: sops-gpg - path: ./ - prune: true - wait: true diff --git a/configs/artifacts.yaml b/configs/artifacts.yaml index 809ad7c..b7f5f5c 100644 --- a/configs/artifacts.yaml +++ b/configs/artifacts.yaml @@ -19,15 +19,10 @@ spec: copy: - from: "@foundation/configs/certificates/**" to: "@artifact/" - - name: alerts-telegram + - name: alerts originRevision: "@foundation" copy: - - from: "@foundation/configs/alerts/telegram/**" - to: "@artifact/" - - name: alerts-repo - originRevision: "@foundation" - copy: - - from: "@foundation/configs/alerts/repo/**" + - from: "@foundation/configs/alerts/**" to: "@artifact/" - name: longhorn-jobs originRevision: "@foundation"