Skip to content

Commit

Permalink
Replace deprecated commonLabels in kustomizations (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
timebertt authored Jan 27, 2025
1 parent cd5eb84 commit da5a1b0
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 23 deletions.
6 changes: 4 additions & 2 deletions config/certificate/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions config/crds/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 4 additions & 2 deletions config/sharder/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions hack/config/monitoring/crds/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions hack/config/monitoring/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ cat <<EOF > 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/^/- /')
Expand Down
8 changes: 5 additions & 3 deletions hack/config/shard/shard/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions webhosting-operator/config/experiment/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions webhosting-operator/config/manager/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit da5a1b0

Please sign in to comment.