Deprecate 'bases:' field.

This commit is contained in:
Jeffrey Regan
2019-06-18 07:28:58 -07:00
parent 0dbe78149d
commit cc531af665
24 changed files with 156 additions and 152 deletions

View File

@@ -2,7 +2,9 @@
`kustomize` supports defining multiple variants with different namespace, as overlays on a common base.
It's possible to create an additional overlay to compose these variants together - just declare the overlays as the bases of a new kustomization. The following demonstrates this using a base that's just one pod.
It's possible to create an additional overlay to compose these variants
together - just declare the overlays as the bases of a new kustomization. The
following demonstrates this using a base that's just one pod.
Define a place to work:
@@ -43,10 +45,9 @@ NSA=$DEMO_HOME/namespace-a
mkdir $NSA
cat <<EOF >$NSA/kustomization.yaml
bases:
- ./../base
resources:
- namespace.yaml
- ../base
namespace: namespace-a
EOF
@@ -65,10 +66,9 @@ NSB=$DEMO_HOME/namespace-b
mkdir $NSB
cat <<EOF >$NSB/kustomization.yaml
bases:
- ./../base
resources:
- namespace.yaml
- ../base
namespace: namespace-b
EOF
@@ -84,9 +84,9 @@ Then define a _Kustomization_ composing two variants together:
<!-- @makeTopLayer @test -->
```
cat <<EOF >$DEMO_HOME/kustomization.yaml
bases:
- ./namespace-a
- ./namespace-b
resources:
- namespace-a
- namespace-b
EOF
```
@@ -112,4 +112,4 @@ Confirm that the `kustomize build` output contains two pod objects from namespac
test 2 == \
$(kustomize build $DEMO_HOME| grep -B 4 "namespace: namespace-[ab]" | grep "name: myapp-pod" | wc -l); \
echo $?
```
```