mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Some kustomization field renaming.
This commit is contained in:
@@ -133,12 +133,11 @@ defining a new name prefix, and some different labels.
|
|||||||
<!-- @makeStagingKustomization @test -->
|
<!-- @makeStagingKustomization @test -->
|
||||||
```
|
```
|
||||||
cat <<'EOF' >$OVERLAYS/staging/kustomize.yaml
|
cat <<'EOF' >$OVERLAYS/staging/kustomize.yaml
|
||||||
kustomizationName: makes-staging-hello
|
|
||||||
namePrefix: staging-
|
namePrefix: staging-
|
||||||
objectLabels:
|
labelsToAdd:
|
||||||
instance: staging
|
instance: staging
|
||||||
org: acmeCorporation
|
org: acmeCorporation
|
||||||
objectAnnotations:
|
annotationsToAdd:
|
||||||
note: Hello, I am staging!
|
note: Hello, I am staging!
|
||||||
bases:
|
bases:
|
||||||
- ../../base
|
- ../../base
|
||||||
@@ -175,12 +174,11 @@ with a different name prefix and labels.
|
|||||||
<!-- @makeProductionKustomization @test -->
|
<!-- @makeProductionKustomization @test -->
|
||||||
```
|
```
|
||||||
cat <<EOF >$OVERLAYS/production/kustomize.yaml
|
cat <<EOF >$OVERLAYS/production/kustomize.yaml
|
||||||
kustomizationName: makes-production-tuthello
|
|
||||||
namePrefix: production-
|
namePrefix: production-
|
||||||
objectLabels:
|
labelsToAdd:
|
||||||
instance: production
|
instance: production
|
||||||
org: acmeCorporation
|
org: acmeCorporation
|
||||||
objectAnnotations:
|
annotationsToAdd:
|
||||||
note: Hello, I am production!
|
note: Hello, I am production!
|
||||||
bases:
|
bases:
|
||||||
- ../../base
|
- ../../base
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ selector.
|
|||||||
`kustomize` does not have `set label` command to add
|
`kustomize` does not have `set label` command to add
|
||||||
label, but we can edit `kustomize.yaml` file under
|
label, but we can edit `kustomize.yaml` file under
|
||||||
`prod` directory and add the production labels under
|
`prod` directory and add the production labels under
|
||||||
`objectLabels` fields as highlighted below.
|
`labelsToAdd` fields as highlighted below.
|
||||||
|
|
||||||
<!-- @customizeLabels @test -->
|
<!-- @customizeLabels @test -->
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ cat kustomize.yaml
|
|||||||
|
|
||||||
> ```
|
> ```
|
||||||
> namePrefix: prod-
|
> namePrefix: prod-
|
||||||
> objectAnnotations:
|
> annotationsToAdd:
|
||||||
> note: This is a example annotation
|
> note: This is a example annotation
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ selector.
|
|||||||
`kustomize` does not have `edit set label` command to add
|
`kustomize` does not have `edit set label` command to add
|
||||||
label, but we can edit `kustomize.yaml` file under
|
label, but we can edit `kustomize.yaml` file under
|
||||||
`prod` directory and add the production labels under
|
`prod` directory and add the production labels under
|
||||||
`objectLabels` fields as highlighted below.
|
`labelsToAdd` fields as highlighted below.
|
||||||
|
|
||||||
<!-- @customizeLabels @test -->
|
<!-- @customizeLabels @test -->
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
kustomizationName: helloworld
|
|
||||||
description: helloworld does useful stuff.
|
|
||||||
namePrefix: some-prefix
|
namePrefix: some-prefix
|
||||||
# Labels to add to all objects and selectors.
|
# Labels to add to all objects and selectors.
|
||||||
# These labels would also be used to form the selector for apply --prune
|
# These labels would also be used to form the selector for apply --prune
|
||||||
# Named differently than “labels” to avoid confusion with metadata for this object
|
# Named differently than “labels” to avoid confusion with metadata for this object
|
||||||
objectLabels:
|
labelsToAdd:
|
||||||
app: helloworld
|
app: helloworld
|
||||||
objectAnnotations:
|
annotationsToAdd:
|
||||||
note: This is an example annotation
|
note: This is an example annotation
|
||||||
resources: []
|
resources: []
|
||||||
#- service.yaml
|
#- service.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user