From da5a1b0b4ed594e1191b4e1e12ea0bd1b81b59d0 Mon Sep 17 00:00:00 2001 From: Tim Ebert Date: Mon, 27 Jan 2025 23:01:13 +0100 Subject: [PATCH] Replace deprecated `commonLabels` in kustomizations (#442) --- config/certificate/kustomization.yaml | 6 ++++-- config/crds/kustomization.yaml | 6 ++++-- config/sharder/kustomization.yaml | 6 ++++-- hack/config/monitoring/crds/kustomization.yaml | 10 ++++++---- hack/config/monitoring/update.sh | 10 ++++++---- hack/config/shard/shard/kustomization.yaml | 8 +++++--- .../config/experiment/base/kustomization.yaml | 6 ++++-- .../config/manager/base/kustomization.yaml | 6 ++++-- .../monitoring/webhosting-operator/kustomization.yaml | 6 ++++-- 9 files changed, 41 insertions(+), 23 deletions(-) diff --git a/config/certificate/kustomization.yaml b/config/certificate/kustomization.yaml index 9679540f..89e08e36 100644 --- a/config/certificate/kustomization.yaml +++ b/config/certificate/kustomization.yaml @@ -3,8 +3,10 @@ kind: Component namespace: sharding-system -commonLabels: - app.kubernetes.io/name: controller-sharding +labels: +- includeSelectors: true + pairs: + app.kubernetes.io/name: controller-sharding resources: - certificate.yaml diff --git a/config/crds/kustomization.yaml b/config/crds/kustomization.yaml index 96bdcda6..7ad29b9b 100644 --- a/config/crds/kustomization.yaml +++ b/config/crds/kustomization.yaml @@ -1,8 +1,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -commonLabels: - app.kubernetes.io/name: controller-sharding +labels: +- includeSelectors: true + pairs: + app.kubernetes.io/name: controller-sharding resources: - namespace.yaml diff --git a/config/sharder/kustomization.yaml b/config/sharder/kustomization.yaml index 49b6702b..e0c1c032 100644 --- a/config/sharder/kustomization.yaml +++ b/config/sharder/kustomization.yaml @@ -6,8 +6,10 @@ namespace: sharding-system generatorOptions: disableNameSuffixHash: true -commonLabels: - app.kubernetes.io/name: controller-sharding +labels: +- includeSelectors: true + pairs: + app.kubernetes.io/name: controller-sharding images: - name: sharder diff --git a/hack/config/monitoring/crds/kustomization.yaml b/hack/config/monitoring/crds/kustomization.yaml index 6f0954f7..39fffcbc 100644 --- a/hack/config/monitoring/crds/kustomization.yaml +++ b/hack/config/monitoring/crds/kustomization.yaml @@ -2,10 +2,12 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -commonLabels: - app.kubernetes.io/name: prometheus-operator - app.kubernetes.io/part-of: kube-prometheus - app.kubernetes.io/version: 0.76.2 +labels: +- includeSelectors: true + pairs: + app.kubernetes.io/name: prometheus-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.76.2 resources: - 0alertmanagerConfigCustomResourceDefinition.yaml diff --git a/hack/config/monitoring/update.sh b/hack/config/monitoring/update.sh index fb5ba0fe..02bc5ee5 100755 --- a/hack/config/monitoring/update.sh +++ b/hack/config/monitoring/update.sh @@ -40,10 +40,12 @@ cat < kustomization.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -commonLabels: - app.kubernetes.io/name: prometheus-operator - app.kubernetes.io/part-of: kube-prometheus - app.kubernetes.io/version: $prometheus_operator_version +labels: +- includeSelectors: true + pairs: + app.kubernetes.io/name: prometheus-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: $prometheus_operator_version resources: $(ls *.yaml | sed 's/^/- /') diff --git a/hack/config/shard/shard/kustomization.yaml b/hack/config/shard/shard/kustomization.yaml index fe2aa398..39bd48c9 100644 --- a/hack/config/shard/shard/kustomization.yaml +++ b/hack/config/shard/shard/kustomization.yaml @@ -3,9 +3,11 @@ kind: Kustomization namespace: default -commonLabels: - app.kubernetes.io/name: controller-sharding - app.kubernetes.io/component: shard +labels: +- includeSelectors: true + pairs: + app.kubernetes.io/name: controller-sharding + app.kubernetes.io/component: shard images: - name: shard diff --git a/webhosting-operator/config/experiment/base/kustomization.yaml b/webhosting-operator/config/experiment/base/kustomization.yaml index 0140a47f..89d2e5e7 100644 --- a/webhosting-operator/config/experiment/base/kustomization.yaml +++ b/webhosting-operator/config/experiment/base/kustomization.yaml @@ -3,8 +3,10 @@ kind: Kustomization namespace: experiment -commonLabels: - app.kubernetes.io/name: experiment +labels: +- includeSelectors: true + pairs: + app.kubernetes.io/name: experiment images: - name: experiment diff --git a/webhosting-operator/config/manager/base/kustomization.yaml b/webhosting-operator/config/manager/base/kustomization.yaml index d9e0c690..895fb29b 100644 --- a/webhosting-operator/config/manager/base/kustomization.yaml +++ b/webhosting-operator/config/manager/base/kustomization.yaml @@ -12,8 +12,10 @@ namespace: webhosting-system namePrefix: webhosting- # Labels to add to all resources and selectors. -commonLabels: - app.kubernetes.io/name: webhosting-operator +labels: +- includeSelectors: true + pairs: + app.kubernetes.io/name: webhosting-operator images: - name: controller diff --git a/webhosting-operator/config/monitoring/webhosting-operator/kustomization.yaml b/webhosting-operator/config/monitoring/webhosting-operator/kustomization.yaml index 8082cfe6..59c1b47f 100644 --- a/webhosting-operator/config/monitoring/webhosting-operator/kustomization.yaml +++ b/webhosting-operator/config/monitoring/webhosting-operator/kustomization.yaml @@ -3,8 +3,10 @@ kind: Kustomization namespace: webhosting-system -commonLabels: - app.kubernetes.io/name: webhosting-operator +labels: +- includeSelectors: true + pairs: + app.kubernetes.io/name: webhosting-operator resources: # provide prometheus running in namespace "monitoring" with the permissions required for service discovery in namespace