Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions api/krusty/testdata/localize/remote/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ resources:
- https://github.com/kubernetes-sigs/kustomize//api/krusty/testdata/localize/simple?submodules=0&ref=kustomize/v4.5.7&timeout=300
- hpa.yaml

commonLabels:
purpose: remoteReference
labels:
- pairs:
purpose: remoteReference
10 changes: 6 additions & 4 deletions examples/breakfast.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ likes her coffee hot:
mkdir -p $DEMO_HOME/breakfast/overlays/alice

cat <<EOF >$DEMO_HOME/breakfast/overlays/alice/kustomization.yaml
commonLabels:
who: alice
labels:
- pairs:
who: alice
resources:
- ../../base
patches:
Expand All @@ -92,8 +93,9 @@ And likewise a [variant] for Bob, who wants _five_ pancakes, with strawberries:
mkdir -p $DEMO_HOME/breakfast/overlays/bob

cat <<EOF >$DEMO_HOME/breakfast/overlays/bob/kustomization.yaml
commonLabels:
who: bob
labels:
- pairs:
who: bob
resources:
- ../../base
patches:
Expand Down
14 changes: 9 additions & 5 deletions examples/configGeneration.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ curl -s -o "$BASE/#1.yaml" "https://raw.githubusercontent.com\
/{deployment,service}.yaml"

cat <<'EOF' >$BASE/kustomization.yaml
commonLabels:
app: hello
labels:
- includeSelectors: true
pairs:
app: hello
resources:
- deployment.yaml
- service.yaml
Expand All @@ -65,9 +67,11 @@ mkdir -p $OVERLAYS/staging
cat <<'EOF' >$OVERLAYS/staging/kustomization.yaml
namePrefix: staging-
nameSuffix: -v1
commonLabels:
variant: staging
org: acmeCorporation
labels:
- includeSelectors: true
pairs:
variant: staging
org: acmeCorporation
commonAnnotations:
note: Hello, I am staging!
resources:
Expand Down
5 changes: 3 additions & 2 deletions examples/configureBuiltinPlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ to be read and transformed:
```
cat <<'EOF' >$DEMO_HOME/kustomization.yaml
namePrefix: hello-
commonLabels:
app: hello
labels:
- pairs:
app: hello
commonAnnotations:
area: "51"
greeting: Take me to your leader
Expand Down
16 changes: 10 additions & 6 deletions examples/helloWorld/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,11 @@ defining a new name prefix, and some different labels.
```
cat <<'EOF' >$OVERLAYS/staging/kustomization.yaml
namePrefix: staging-
commonLabels:
variant: staging
org: acmeCorporation
labels:
- includeSelectors: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like includeSelectors was removed from examples/helloWorld/kustomization.yaml.
Do you have any reason to still remain?

pairs:
variant: staging
org: acmeCorporation
commonAnnotations:
note: Hello, I am staging!
resources:
Expand Down Expand Up @@ -184,9 +186,11 @@ with a different name prefix and labels.
```
cat <<EOF >$OVERLAYS/production/kustomization.yaml
namePrefix: production-
commonLabels:
variant: production
org: acmeCorporation
labels:
- includeSelectors: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

pairs:
variant: production
org: acmeCorporation
commonAnnotations:
note: Hello, I am production!
resources:
Expand Down
5 changes: 3 additions & 2 deletions examples/helloWorld/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ metadata:

# Example configuration for the webserver
# at https://github.com/monopole/hello
commonLabels:
app: hello
labels:
- pairs:
app: hello

resources:
- deployment.yaml
Expand Down
5 changes: 3 additions & 2 deletions examples/springboot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ add a label, but one can always edit
<!-- @customizeLabels @testAgainstLatestRelease -->
```
cat <<EOF >>$DEMO_HOME/kustomization.yaml
commonLabels:
env: prod
labels:
- pairs:
env: prod
EOF
```

Expand Down
6 changes: 4 additions & 2 deletions examples/transformerconfigs/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ resources:

namePrefix: test-

commonLabels:
foo: bar
labels:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example modifies the behavior of commonLabels in the transformer configuration.
If you modify this section, also update the README.md to instruct users to configure the labels transformer accordingly.

If you don't know how to change the contents of this section, it's fine to keep it as is.

- includeSelectors: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

pairs:
foo: bar

vars:
- name: BEE_ACTION
Expand Down
Loading