From 848f1a545a265b187b309fcb77f00d147a3d0af3 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Sat, 19 Oct 2024 16:38:02 -0500 Subject: [PATCH] standardize app name label --- .archive/vault/ks.yaml | 5 ++++- kubernetes/apps/cert-manager/cert-manager/ks.yaml | 10 ++++++++-- kubernetes/apps/cert-manager/webhook-dnsimple/ks.yaml | 5 ++++- .../userinit-controller/helmrepository.yaml | 2 +- kubernetes/apps/flux-system/add-ons/ks.yaml | 10 ++++++++-- kubernetes/apps/kube-system/metrics-server/ks.yaml | 5 ++++- .../apps/kube-system/nvidia-device-plugin/ks.yaml | 5 ++++- kubernetes/apps/kube-system/reloader/ks.yaml | 5 ++++- kubernetes/apps/kyverno/kyverno/ks.yaml | 7 +++++-- kubernetes/apps/network/echo-server/ks.yaml | 5 ++++- kubernetes/apps/network/external-dns/ks.yaml | 10 ++++++++-- kubernetes/apps/network/ingress-nginx/ks.yaml | 10 ++++++++-- kubernetes/apps/security/external-secrets/ks.yaml | 10 ++++++++-- 13 files changed, 70 insertions(+), 19 deletions(-) diff --git a/.archive/vault/ks.yaml b/.archive/vault/ks.yaml index ea1b386a..61a5ed2e 100644 --- a/.archive/vault/ks.yaml +++ b/.archive/vault/ks.yaml @@ -3,9 +3,12 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: vault + name: &app vault namespace: flux-system spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app interval: 1m path: "./kubernetes/apps/security/vault/app" prune: true diff --git a/kubernetes/apps/cert-manager/cert-manager/ks.yaml b/kubernetes/apps/cert-manager/cert-manager/ks.yaml index f624b919..adbaf438 100644 --- a/kubernetes/apps/cert-manager/cert-manager/ks.yaml +++ b/kubernetes/apps/cert-manager/cert-manager/ks.yaml @@ -3,9 +3,12 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: cert-manager + name: &app cert-manager namespace: flux-system spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app interval: 10m path: "./kubernetes/apps/cert-manager/cert-manager/app" prune: true @@ -18,9 +21,12 @@ spec: apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: cert-manager-issuers + name: &app cert-manager-issuers namespace: flux-system spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app interval: 10m path: "./kubernetes/apps/cert-manager/cert-manager/issuers" prune: true diff --git a/kubernetes/apps/cert-manager/webhook-dnsimple/ks.yaml b/kubernetes/apps/cert-manager/webhook-dnsimple/ks.yaml index 76249172..7cdd3f54 100644 --- a/kubernetes/apps/cert-manager/webhook-dnsimple/ks.yaml +++ b/kubernetes/apps/cert-manager/webhook-dnsimple/ks.yaml @@ -3,9 +3,12 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: cert-manager-webhook-dnsimple + name: &app cert-manager-webhook-dnsimple namespace: flux-system spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app targetNamespace: cert-manager interval: 10m path: "./kubernetes/apps/cert-manager/webhook-dnsimple/app" diff --git a/kubernetes/apps/database/crunchy-postgres-operator/userinit-controller/helmrepository.yaml b/kubernetes/apps/database/crunchy-postgres-operator/userinit-controller/helmrepository.yaml index f3e2c1a6..b82838db 100644 --- a/kubernetes/apps/database/crunchy-postgres-operator/userinit-controller/helmrepository.yaml +++ b/kubernetes/apps/database/crunchy-postgres-operator/userinit-controller/helmrepository.yaml @@ -1,5 +1,5 @@ --- -# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrepository-source-v1beta2.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrepository-source-v1.json apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmRepository metadata: diff --git a/kubernetes/apps/flux-system/add-ons/ks.yaml b/kubernetes/apps/flux-system/add-ons/ks.yaml index 48860edd..42b634ae 100644 --- a/kubernetes/apps/flux-system/add-ons/ks.yaml +++ b/kubernetes/apps/flux-system/add-ons/ks.yaml @@ -3,11 +3,14 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: flux-webhooks + name: &app flux-webhooks namespace: flux-system labels: substitution.flux.home.arpa/enabled: "true" spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app interval: 10m path: ./kubernetes/apps/flux-system/add-ons/webhooks prune: true @@ -20,11 +23,14 @@ spec: apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: flux-monitoring + name: &app flux-monitoring namespace: flux-system labels: substitution.flux.home.arpa/enabled: "true" spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app interval: 10m path: ./kubernetes/apps/flux-system/add-ons/monitoring prune: true diff --git a/kubernetes/apps/kube-system/metrics-server/ks.yaml b/kubernetes/apps/kube-system/metrics-server/ks.yaml index 7adca6ae..3b2c1db7 100644 --- a/kubernetes/apps/kube-system/metrics-server/ks.yaml +++ b/kubernetes/apps/kube-system/metrics-server/ks.yaml @@ -3,11 +3,14 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: metrics-server + name: &app metrics-server namespace: flux-system labels: substitution.flux.home.arpa/enabled: "true" spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app interval: 10m path: "./kubernetes/apps/kube-system/metrics-server/app" prune: true diff --git a/kubernetes/apps/kube-system/nvidia-device-plugin/ks.yaml b/kubernetes/apps/kube-system/nvidia-device-plugin/ks.yaml index 6f5c0976..159ea2c0 100644 --- a/kubernetes/apps/kube-system/nvidia-device-plugin/ks.yaml +++ b/kubernetes/apps/kube-system/nvidia-device-plugin/ks.yaml @@ -3,11 +3,14 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: nvidia-device-plugin + name: &app nvidia-device-plugin namespace: flux-system labels: substitution.flux.home.arpa/enabled: "true" spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app targetNamespace: kube-system interval: 10m path: "./kubernetes/apps/kube-system/nvidia-device-plugin/app" diff --git a/kubernetes/apps/kube-system/reloader/ks.yaml b/kubernetes/apps/kube-system/reloader/ks.yaml index b0b41d76..e5dc1814 100644 --- a/kubernetes/apps/kube-system/reloader/ks.yaml +++ b/kubernetes/apps/kube-system/reloader/ks.yaml @@ -3,11 +3,14 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: reloader + name: &app reloader namespace: flux-system labels: substitution.flux.home.arpa/enabled: "true" spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app interval: 10m path: "./kubernetes/apps/kube-system/reloader/app" prune: true diff --git a/kubernetes/apps/kyverno/kyverno/ks.yaml b/kubernetes/apps/kyverno/kyverno/ks.yaml index ef9ae381..37a17104 100644 --- a/kubernetes/apps/kyverno/kyverno/ks.yaml +++ b/kubernetes/apps/kyverno/kyverno/ks.yaml @@ -3,7 +3,7 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: kyverno + name: &app kyverno namespace: flux-system spec: path: ./kubernetes/apps/kyverno/kyverno/app @@ -19,9 +19,12 @@ spec: apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: cluster-policies + name: &app cluster-policies namespace: flux-system spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app dependsOn: - name: kyverno path: ./kubernetes/apps/kyverno/kyverno/policies diff --git a/kubernetes/apps/network/echo-server/ks.yaml b/kubernetes/apps/network/echo-server/ks.yaml index db8b7fc8..7d5c3b97 100644 --- a/kubernetes/apps/network/echo-server/ks.yaml +++ b/kubernetes/apps/network/echo-server/ks.yaml @@ -3,11 +3,14 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: echo-server + name: &app echo-server namespace: flux-system labels: substitution.flux.home.arpa/enabled: "true" spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app interval: 10m path: "./kubernetes/apps/network/echo-server/app" prune: true diff --git a/kubernetes/apps/network/external-dns/ks.yaml b/kubernetes/apps/network/external-dns/ks.yaml index 9c21433f..84240da4 100644 --- a/kubernetes/apps/network/external-dns/ks.yaml +++ b/kubernetes/apps/network/external-dns/ks.yaml @@ -3,11 +3,14 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: externaldns-hsn-dev + name: &app externaldns-hsn-dev namespace: flux-system labels: substitution.flux.home.arpa/enabled: "true" spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app targetNamespace: network interval: 10m path: "./kubernetes/apps/network/external-dns/app/hsn-dev" @@ -23,11 +26,14 @@ spec: apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: externaldns-jahanson-tech + name: &app externaldns-jahanson-tech namespace: flux-system labels: substitution.flux.home.arpa/enabled: "true" spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app targetNamespace: network interval: 10m path: "./kubernetes/apps/network/external-dns/app/jahanson-tech" diff --git a/kubernetes/apps/network/ingress-nginx/ks.yaml b/kubernetes/apps/network/ingress-nginx/ks.yaml index d4604502..ecff79b6 100644 --- a/kubernetes/apps/network/ingress-nginx/ks.yaml +++ b/kubernetes/apps/network/ingress-nginx/ks.yaml @@ -3,11 +3,14 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: ingress-nginx-external + name: &app ingress-nginx-external namespace: flux-system labels: substitution.flux.home.arpa/enabled: "true" spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app interval: 10m path: "./kubernetes/apps/network/ingress-nginx/external" prune: true @@ -22,11 +25,14 @@ spec: apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: ingress-nginx-internal + name: &app ingress-nginx-internal namespace: flux-system labels: substitution.flux.home.arpa/enabled: "true" spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app interval: 10m path: "./kubernetes/apps/network/ingress-nginx/internal" prune: true diff --git a/kubernetes/apps/security/external-secrets/ks.yaml b/kubernetes/apps/security/external-secrets/ks.yaml index f3cf7c8d..6ae0b18a 100644 --- a/kubernetes/apps/security/external-secrets/ks.yaml +++ b/kubernetes/apps/security/external-secrets/ks.yaml @@ -3,9 +3,12 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: external-secrets + name: &app external-secrets namespace: flux-system spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app interval: 10m path: "./kubernetes/apps/security/external-secrets/app" prune: true @@ -18,9 +21,12 @@ spec: apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: external-secrets-stores + name: &app external-secrets-stores namespace: flux-system spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app interval: 10m path: "./kubernetes/apps/security/external-secrets/stores" prune: true