Skip to content

Commit c0b26cc

Browse files
committed
fix: remove deprecated commonLabels
1 parent 11f9435 commit c0b26cc

File tree

8 files changed

+47
-25
lines changed

8 files changed

+47
-25
lines changed

api/krusty/testdata/localize/remote/kustomization.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ resources:
55
- https://github.com/kubernetes-sigs/kustomize//api/krusty/testdata/localize/simple?submodules=0&ref=kustomize/v4.5.7&timeout=300
66
- hpa.yaml
77

8-
commonLabels:
9-
purpose: remoteReference
8+
labels:
9+
- includeSelectors: true
10+
pairs:
11+
purpose: remoteReference

examples/breakfast.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ likes her coffee hot:
6969
mkdir -p $DEMO_HOME/breakfast/overlays/alice
7070
7171
cat <<EOF >$DEMO_HOME/breakfast/overlays/alice/kustomization.yaml
72-
commonLabels:
73-
who: alice
72+
labels:
73+
- includeSelectors: true
74+
pairs:
75+
who: alice
7476
resources:
7577
- ../../base
7678
patches:
@@ -92,8 +94,10 @@ And likewise a [variant] for Bob, who wants _five_ pancakes, with strawberries:
9294
mkdir -p $DEMO_HOME/breakfast/overlays/bob
9395
9496
cat <<EOF >$DEMO_HOME/breakfast/overlays/bob/kustomization.yaml
95-
commonLabels:
96-
who: bob
97+
labels:
98+
- includeSelectors: true
99+
pairs:
100+
who: bob
97101
resources:
98102
- ../../base
99103
patches:

examples/configGeneration.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ curl -s -o "$BASE/#1.yaml" "https://raw.githubusercontent.com\
4141
/{deployment,service}.yaml"
4242

4343
cat <<'EOF' >$BASE/kustomization.yaml
44-
commonLabels:
45-
app: hello
44+
labels:
45+
- includeSelectors: true
46+
pairs:
47+
app: hello
4648
resources:
4749
- deployment.yaml
4850
- service.yaml
@@ -65,9 +67,11 @@ mkdir -p $OVERLAYS/staging
6567
cat <<'EOF' >$OVERLAYS/staging/kustomization.yaml
6668
namePrefix: staging-
6769
nameSuffix: -v1
68-
commonLabels:
69-
variant: staging
70-
org: acmeCorporation
70+
labels:
71+
- includeSelectors: true
72+
pairs:
73+
variant: staging
74+
org: acmeCorporation
7175
commonAnnotations:
7276
note: Hello, I am staging!
7377
resources:

examples/configureBuiltinPlugin.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ to be read and transformed:
100100
```
101101
cat <<'EOF' >$DEMO_HOME/kustomization.yaml
102102
namePrefix: hello-
103-
commonLabels:
104-
app: hello
103+
labels:
104+
- includeSelectors: true
105+
pairs:
106+
app: hello
105107
commonAnnotations:
106108
area: "51"
107109
greeting: Take me to your leader

examples/helloWorld/README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,11 @@ defining a new name prefix, and some different labels.
143143
```
144144
cat <<'EOF' >$OVERLAYS/staging/kustomization.yaml
145145
namePrefix: staging-
146-
commonLabels:
147-
variant: staging
148-
org: acmeCorporation
146+
labels:
147+
- includeSelectors: true
148+
pairs:
149+
variant: staging
150+
org: acmeCorporation
149151
commonAnnotations:
150152
note: Hello, I am staging!
151153
resources:
@@ -184,9 +186,11 @@ with a different name prefix and labels.
184186
```
185187
cat <<EOF >$OVERLAYS/production/kustomization.yaml
186188
namePrefix: production-
187-
commonLabels:
188-
variant: production
189-
org: acmeCorporation
189+
labels:
190+
- includeSelectors: true
191+
pairs:
192+
variant: production
193+
org: acmeCorporation
190194
commonAnnotations:
191195
note: Hello, I am production!
192196
resources:

examples/helloWorld/kustomization.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ metadata:
55

66
# Example configuration for the webserver
77
# at https://github.com/monopole/hello
8-
commonLabels:
9-
app: hello
8+
labels:
9+
- includeSelectors: true
10+
pairs:
11+
app: hello
1012

1113
resources:
1214
- deployment.yaml

examples/springboot/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,10 @@ add a label, but one can always edit
183183
<!-- @customizeLabels @testAgainstLatestRelease -->
184184
```
185185
cat <<EOF >>$DEMO_HOME/kustomization.yaml
186-
commonLabels:
187-
env: prod
186+
labels:
187+
- includeSelectors: true
188+
pairs:
189+
env: prod
188190
EOF
189191
```
190192

examples/transformerconfigs/crd/kustomization.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ resources:
33

44
namePrefix: test-
55

6-
commonLabels:
7-
foo: bar
6+
labels:
7+
- includeSelectors: true
8+
pairs:
9+
foo: bar
810

911
vars:
1012
- name: BEE_ACTION

0 commit comments

Comments
 (0)