diff --git a/kubernetes/apps/actions-runner-system/kustomization.yaml b/kubernetes/apps/actions-runner-system/kustomization.yaml index 98183e38eaf70..71548361806ba 100644 --- a/kubernetes/apps/actions-runner-system/kustomization.yaml +++ b/kubernetes/apps/actions-runner-system/kustomization.yaml @@ -5,6 +5,15 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml + - ../../templates/flux # Flux-Kustomizations - ./gha-runner-scale-set-controller/ks.yaml - ./gha-runner-scale-set/ks.yaml +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: not-used + namespace: actions-runner-system + unsetOnly: true diff --git a/kubernetes/apps/actions-runner-system/namespace.yaml b/kubernetes/apps/actions-runner-system/namespace.yaml index 7bdef02e23f40..d6512dfb82e10 100644 --- a/kubernetes/apps/actions-runner-system/namespace.yaml +++ b/kubernetes/apps/actions-runner-system/namespace.yaml @@ -6,33 +6,3 @@ metadata: annotations: kustomize.toolkit.fluxcd.io/prune: disabled volsync.backube/privileged-movers: "true" ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Provider -metadata: - name: alert-manager - namespace: actions-runner-system -spec: - type: alertmanager - address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Alert -metadata: - name: alert-manager - namespace: actions-runner-system -spec: - providerRef: - name: alert-manager - eventSeverity: error - eventSources: - - kind: HelmRelease - name: "*" - exclusionList: - - "error.*lookup github\\.com" - - "error.*lookup raw\\.githubusercontent\\.com" - - "dial.*tcp.*timeout" - - "waiting.*socket" - suspend: false diff --git a/kubernetes/apps/cert-manager/kustomization.yaml b/kubernetes/apps/cert-manager/kustomization.yaml index f173691254275..22e7433af2da8 100644 --- a/kubernetes/apps/cert-manager/kustomization.yaml +++ b/kubernetes/apps/cert-manager/kustomization.yaml @@ -5,5 +5,14 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml + - ../../templates/flux # Flux-Kustomizations - ./cert-manager/ks.yaml +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: not-used + namespace: cert-manager + unsetOnly: true diff --git a/kubernetes/apps/cert-manager/namespace.yaml b/kubernetes/apps/cert-manager/namespace.yaml index 9e6a66025f6ec..badc4ccdbd9db 100644 --- a/kubernetes/apps/cert-manager/namespace.yaml +++ b/kubernetes/apps/cert-manager/namespace.yaml @@ -6,33 +6,3 @@ metadata: annotations: kustomize.toolkit.fluxcd.io/prune: disabled volsync.backube/privileged-movers: "true" ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Provider -metadata: - name: alert-manager - namespace: cert-manager -spec: - type: alertmanager - address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Alert -metadata: - name: alert-manager - namespace: cert-manager -spec: - providerRef: - name: alert-manager - eventSeverity: error - eventSources: - - kind: HelmRelease - name: "*" - exclusionList: - - "error.*lookup github\\.com" - - "error.*lookup raw\\.githubusercontent\\.com" - - "dial.*tcp.*timeout" - - "waiting.*socket" - suspend: false diff --git a/kubernetes/apps/default/kustomization.yaml b/kubernetes/apps/default/kustomization.yaml index 475e67054e81d..bc6e7645a4dd5 100644 --- a/kubernetes/apps/default/kustomization.yaml +++ b/kubernetes/apps/default/kustomization.yaml @@ -5,6 +5,7 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml + - ../../templates/flux # Flux-Kustomizations - ./atuin/ks.yaml - ./autobrr/ks.yaml @@ -28,3 +29,11 @@ resources: - ./unpackerr/ks.yaml - ./zigbee/ks.yaml - ./zwave/ks.yaml +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: not-used + namespace: default + unsetOnly: true diff --git a/kubernetes/apps/default/namespace.yaml b/kubernetes/apps/default/namespace.yaml index 043eee7d7c8d7..427b91994788d 100644 --- a/kubernetes/apps/default/namespace.yaml +++ b/kubernetes/apps/default/namespace.yaml @@ -6,33 +6,3 @@ metadata: annotations: kustomize.toolkit.fluxcd.io/prune: disabled volsync.backube/privileged-movers: "true" ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Provider -metadata: - name: alert-manager - namespace: default -spec: - type: alertmanager - address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Alert -metadata: - name: alert-manager - namespace: default -spec: - providerRef: - name: alert-manager - eventSeverity: error - eventSources: - - kind: HelmRelease - name: "*" - exclusionList: - - "error.*lookup github\\.com" - - "error.*lookup raw\\.githubusercontent\\.com" - - "dial.*tcp.*timeout" - - "waiting.*socket" - suspend: false diff --git a/kubernetes/apps/external-secrets/kustomization.yaml b/kubernetes/apps/external-secrets/kustomization.yaml index 2af980e3dadac..e0ad59967172d 100644 --- a/kubernetes/apps/external-secrets/kustomization.yaml +++ b/kubernetes/apps/external-secrets/kustomization.yaml @@ -5,6 +5,15 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml + - ../../templates/flux # Flux-Kustomizations - ./external-secrets/ks.yaml - ./onepassword-connect/ks.yaml +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: not-used + namespace: external-secrets + unsetOnly: true diff --git a/kubernetes/apps/external-secrets/namespace.yaml b/kubernetes/apps/external-secrets/namespace.yaml index 2a768989682ec..26718c2a68cf1 100644 --- a/kubernetes/apps/external-secrets/namespace.yaml +++ b/kubernetes/apps/external-secrets/namespace.yaml @@ -5,33 +5,3 @@ metadata: name: external-secrets labels: kustomize.toolkit.fluxcd.io/prune: disabled ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Provider -metadata: - name: alert-manager - namespace: external-secrets -spec: - type: alertmanager - address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Alert -metadata: - name: alert-manager - namespace: external-secrets -spec: - providerRef: - name: alert-manager - eventSeverity: error - eventSources: - - kind: HelmRelease - name: "*" - exclusionList: - - "error.*lookup github\\.com" - - "error.*lookup raw\\.githubusercontent\\.com" - - "dial.*tcp.*timeout" - - "waiting.*socket" - suspend: false diff --git a/kubernetes/apps/flux-system/kustomization.yaml b/kubernetes/apps/flux-system/kustomization.yaml index e5550ff46f76e..6d86b9ce16904 100644 --- a/kubernetes/apps/flux-system/kustomization.yaml +++ b/kubernetes/apps/flux-system/kustomization.yaml @@ -5,5 +5,14 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml + - ../../templates/flux # Flux-Kustomizations - ./flux-operator/ks.yaml +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: not-used + namespace: flux-system + unsetOnly: true diff --git a/kubernetes/apps/flux-system/namespace.yaml b/kubernetes/apps/flux-system/namespace.yaml index 38c6a2adf4520..a492f92112e8c 100644 --- a/kubernetes/apps/flux-system/namespace.yaml +++ b/kubernetes/apps/flux-system/namespace.yaml @@ -6,41 +6,3 @@ metadata: annotations: kustomize.toolkit.fluxcd.io/prune: disabled volsync.backube/privileged-movers: "true" ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Provider -metadata: - name: alert-manager - namespace: flux-system -spec: - type: alertmanager - address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Alert -metadata: - name: alert-manager - namespace: flux-system -spec: - providerRef: - name: alert-manager - eventSeverity: error - eventSources: - - kind: GitRepository - name: "*" - - kind: HelmRelease - name: "*" - - kind: HelmRepository - name: "*" - - kind: Kustomization - name: "*" - - kind: OCIRepository - name: "*" - exclusionList: - - "error.*lookup github\\.com" - - "error.*lookup raw\\.githubusercontent\\.com" - - "dial.*tcp.*timeout" - - "waiting.*socket" - suspend: false diff --git a/kubernetes/apps/kube-system/kustomization.yaml b/kubernetes/apps/kube-system/kustomization.yaml index 7970c52c36b74..2d8315cdf70a0 100644 --- a/kubernetes/apps/kube-system/kustomization.yaml +++ b/kubernetes/apps/kube-system/kustomization.yaml @@ -5,6 +5,7 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml + - ../../templates/flux # Flux-Kustomizations - ./cilium/ks.yaml - ./coredns/ks.yaml @@ -16,3 +17,11 @@ resources: - ./node-feature-discovery/ks.yaml - ./reloader/ks.yaml - ./spegel/ks.yaml +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: not-used + namespace: kube-system + unsetOnly: true diff --git a/kubernetes/apps/kube-system/namespace.yaml b/kubernetes/apps/kube-system/namespace.yaml index c16492e39464c..a437cb0f8147e 100644 --- a/kubernetes/apps/kube-system/namespace.yaml +++ b/kubernetes/apps/kube-system/namespace.yaml @@ -6,33 +6,3 @@ metadata: annotations: kustomize.toolkit.fluxcd.io/prune: disabled volsync.backube/privileged-movers: "true" ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Provider -metadata: - name: alert-manager - namespace: kube-system -spec: - type: alertmanager - address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Alert -metadata: - name: alert-manager - namespace: kube-system -spec: - providerRef: - name: alert-manager - eventSeverity: error - eventSources: - - kind: HelmRelease - name: "*" - exclusionList: - - "error.*lookup github\\.com" - - "error.*lookup raw\\.githubusercontent\\.com" - - "dial.*tcp.*timeout" - - "waiting.*socket" - suspend: false diff --git a/kubernetes/apps/kyverno/kustomization.yaml b/kubernetes/apps/kyverno/kustomization.yaml index 10b5d06cda0b2..3c1d13e7437b5 100644 --- a/kubernetes/apps/kyverno/kustomization.yaml +++ b/kubernetes/apps/kyverno/kustomization.yaml @@ -5,5 +5,14 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml + - ../../templates/flux # Flux-Kustomizations - ./kyverno/ks.yaml +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: not-used + namespace: kyverno + unsetOnly: true diff --git a/kubernetes/apps/kyverno/namespace.yaml b/kubernetes/apps/kyverno/namespace.yaml index 2ca2500773d9e..9866a0622a7be 100644 --- a/kubernetes/apps/kyverno/namespace.yaml +++ b/kubernetes/apps/kyverno/namespace.yaml @@ -6,33 +6,3 @@ metadata: annotations: kustomize.toolkit.fluxcd.io/prune: disabled volsync.backube/privileged-movers: "true" ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Provider -metadata: - name: alert-manager - namespace: kyverno -spec: - type: alertmanager - address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Alert -metadata: - name: alert-manager - namespace: kyverno -spec: - providerRef: - name: alert-manager - eventSeverity: error - eventSources: - - kind: HelmRelease - name: "*" - exclusionList: - - "error.*lookup github\\.com" - - "error.*lookup raw\\.githubusercontent\\.com" - - "dial.*tcp.*timeout" - - "waiting.*socket" - suspend: false diff --git a/kubernetes/apps/network/kustomization.yaml b/kubernetes/apps/network/kustomization.yaml index ad0948e33f17e..d61ca935ce113 100644 --- a/kubernetes/apps/network/kustomization.yaml +++ b/kubernetes/apps/network/kustomization.yaml @@ -5,9 +5,18 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml + - ../../templates/flux # Flux-Kustomizations - ./cloudflare-ddns/ks.yaml - ./cloudflared/ks.yaml - ./echo-server/ks.yaml - ./external-dns/ks.yaml - ./nginx/ks.yaml +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: not-used + namespace: network + unsetOnly: true diff --git a/kubernetes/apps/network/namespace.yaml b/kubernetes/apps/network/namespace.yaml index 356e3dc5a13ea..73258558620d3 100644 --- a/kubernetes/apps/network/namespace.yaml +++ b/kubernetes/apps/network/namespace.yaml @@ -6,33 +6,3 @@ metadata: annotations: kustomize.toolkit.fluxcd.io/prune: disabled volsync.backube/privileged-movers: "true" ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Provider -metadata: - name: alert-manager - namespace: network -spec: - type: alertmanager - address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Alert -metadata: - name: alert-manager - namespace: network -spec: - providerRef: - name: alert-manager - eventSeverity: error - eventSources: - - kind: HelmRelease - name: "*" - exclusionList: - - "error.*lookup github\\.com" - - "error.*lookup raw\\.githubusercontent\\.com" - - "dial.*tcp.*timeout" - - "waiting.*socket" - suspend: false diff --git a/kubernetes/apps/observability/kustomization.yaml b/kubernetes/apps/observability/kustomization.yaml index d7959f650ade4..50d5db0f5823b 100644 --- a/kubernetes/apps/observability/kustomization.yaml +++ b/kubernetes/apps/observability/kustomization.yaml @@ -5,6 +5,7 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml + - ../../templates/flux # Flux-Kustomizations - ./blackbox-exporter/ks.yaml - ./gatus/ks.yaml @@ -17,3 +18,11 @@ resources: - ./smartctl-exporter/ks.yaml - ./snmp-exporter/ks.yaml - ./unpoller/ks.yaml +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: not-used + namespace: observability + unsetOnly: true diff --git a/kubernetes/apps/observability/namespace.yaml b/kubernetes/apps/observability/namespace.yaml index cef355262d2fe..ce3a5bd22a057 100644 --- a/kubernetes/apps/observability/namespace.yaml +++ b/kubernetes/apps/observability/namespace.yaml @@ -5,33 +5,3 @@ metadata: name: observability labels: kustomize.toolkit.fluxcd.io/prune: disabled ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Provider -metadata: - name: alert-manager - namespace: observability -spec: - type: alertmanager - address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Alert -metadata: - name: alert-manager - namespace: observability -spec: - providerRef: - name: alert-manager - eventSeverity: error - eventSources: - - kind: HelmRelease - name: "*" - exclusionList: - - "error.*lookup github\\.com" - - "error.*lookup raw\\.githubusercontent\\.com" - - "dial.*tcp.*timeout" - - "waiting.*socket" - suspend: false diff --git a/kubernetes/apps/openebs-system/kustomization.yaml b/kubernetes/apps/openebs-system/kustomization.yaml index 011b51012e059..edf7815431546 100644 --- a/kubernetes/apps/openebs-system/kustomization.yaml +++ b/kubernetes/apps/openebs-system/kustomization.yaml @@ -5,5 +5,14 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml + - ../../templates/flux # Flux-Kustomizations - ./openebs/ks.yaml +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: not-used + namespace: openebs-system + unsetOnly: true diff --git a/kubernetes/apps/openebs-system/namespace.yaml b/kubernetes/apps/openebs-system/namespace.yaml index 49bcf897d45b7..18921b50d64ea 100644 --- a/kubernetes/apps/openebs-system/namespace.yaml +++ b/kubernetes/apps/openebs-system/namespace.yaml @@ -6,33 +6,3 @@ metadata: annotations: kustomize.toolkit.fluxcd.io/prune: disabled volsync.backube/privileged-movers: "true" ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Provider -metadata: - name: alert-manager - namespace: openebs-system -spec: - type: alertmanager - address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Alert -metadata: - name: alert-manager - namespace: openebs-system -spec: - providerRef: - name: alert-manager - eventSeverity: error - eventSources: - - kind: HelmRelease - name: "*" - exclusionList: - - "error.*lookup github\\.com" - - "error.*lookup raw\\.githubusercontent\\.com" - - "dial.*tcp.*timeout" - - "waiting.*socket" - suspend: false diff --git a/kubernetes/apps/rook-ceph/kustomization.yaml b/kubernetes/apps/rook-ceph/kustomization.yaml index dcaf9188b816e..64452136fc9f9 100644 --- a/kubernetes/apps/rook-ceph/kustomization.yaml +++ b/kubernetes/apps/rook-ceph/kustomization.yaml @@ -5,5 +5,14 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml + - ../../templates/flux # Flux-Kustomizations - ./rook-ceph/ks.yaml +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: not-used + namespace: rook-ceph + unsetOnly: true diff --git a/kubernetes/apps/rook-ceph/namespace.yaml b/kubernetes/apps/rook-ceph/namespace.yaml index 6253603cc520b..69fda7af43b1e 100644 --- a/kubernetes/apps/rook-ceph/namespace.yaml +++ b/kubernetes/apps/rook-ceph/namespace.yaml @@ -6,33 +6,3 @@ metadata: annotations: kustomize.toolkit.fluxcd.io/prune: disabled volsync.backube/privileged-movers: "true" ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Provider -metadata: - name: alert-manager - namespace: rook-ceph -spec: - type: alertmanager - address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Alert -metadata: - name: alert-manager - namespace: rook-ceph -spec: - providerRef: - name: alert-manager - eventSeverity: error - eventSources: - - kind: HelmRelease - name: "*" - exclusionList: - - "error.*lookup github\\.com" - - "error.*lookup raw\\.githubusercontent\\.com" - - "dial.*tcp.*timeout" - - "waiting.*socket" - suspend: false diff --git a/kubernetes/apps/volsync-system/kustomization.yaml b/kubernetes/apps/volsync-system/kustomization.yaml index 5b5a44ea55025..4d7d1a19c5497 100644 --- a/kubernetes/apps/volsync-system/kustomization.yaml +++ b/kubernetes/apps/volsync-system/kustomization.yaml @@ -5,6 +5,15 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml + - ../../templates/flux # Flux-Kustomizations - ./snapshot-controller/ks.yaml - ./volsync/ks.yaml +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: not-used + namespace: volsync-system + unsetOnly: true diff --git a/kubernetes/apps/volsync-system/namespace.yaml b/kubernetes/apps/volsync-system/namespace.yaml index 082ad6dac3ea6..af3ef132aa4ae 100644 --- a/kubernetes/apps/volsync-system/namespace.yaml +++ b/kubernetes/apps/volsync-system/namespace.yaml @@ -6,33 +6,3 @@ metadata: annotations: kustomize.toolkit.fluxcd.io/prune: disabled volsync.backube/privileged-movers: "true" ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Provider -metadata: - name: alert-manager - namespace: volsync-system -spec: - type: alertmanager - address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Alert -metadata: - name: alert-manager - namespace: volsync-system -spec: - providerRef: - name: alert-manager - eventSeverity: error - eventSources: - - kind: HelmRelease - name: "*" - exclusionList: - - "error.*lookup github\\.com" - - "error.*lookup raw\\.githubusercontent\\.com" - - "dial.*tcp.*timeout" - - "waiting.*socket" - suspend: false diff --git a/kubernetes/templates/flux/alert.yaml b/kubernetes/templates/flux/alert.yaml new file mode 100644 index 0000000000000..9bd1eb713b2be --- /dev/null +++ b/kubernetes/templates/flux/alert.yaml @@ -0,0 +1,27 @@ +--- +# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json +apiVersion: notification.toolkit.fluxcd.io/v1beta3 +kind: Alert +metadata: + name: alert-manager +spec: + providerRef: + name: alert-manager + eventSeverity: error + eventSources: + - kind: GitRepository + name: "*" + - kind: HelmRelease + name: "*" + - kind: HelmRepository + name: "*" + - kind: Kustomization + name: "*" + - kind: OCIRepository + name: "*" + exclusionList: + - "error.*lookup github\\.com" + - "error.*lookup raw\\.githubusercontent\\.com" + - "dial.*tcp.*timeout" + - "waiting.*socket" + suspend: false diff --git a/kubernetes/templates/flux/kustomization.yaml b/kubernetes/templates/flux/kustomization.yaml new file mode 100644 index 0000000000000..a39198cb6e471 --- /dev/null +++ b/kubernetes/templates/flux/kustomization.yaml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./alert.yaml + - ./provider.yaml diff --git a/kubernetes/templates/flux/provider.yaml b/kubernetes/templates/flux/provider.yaml new file mode 100644 index 0000000000000..cd2f67fd0e366 --- /dev/null +++ b/kubernetes/templates/flux/provider.yaml @@ -0,0 +1,9 @@ +--- +# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json +apiVersion: notification.toolkit.fluxcd.io/v1beta3 +kind: Provider +metadata: + name: alert-manager +spec: + type: alertmanager + address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/