mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 10:00:56 +00:00
Revert "add apiVersion and kind to docs and examples" (#653)
This commit is contained in:
@@ -32,10 +32,6 @@
|
|||||||
# visible in configuration reviews.
|
# visible in configuration reviews.
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
|
|
||||||
# apiVersion and Kind for current kustomization.yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
|
|
||||||
# Adds namespace to all resources.
|
# Adds namespace to all resources.
|
||||||
namespace: my-namespace
|
namespace: my-namespace
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ breakfast. This breakfast has coffee and pancakes:
|
|||||||
<!-- @baseKustomization @test -->
|
<!-- @baseKustomization @test -->
|
||||||
```
|
```
|
||||||
cat <<EOF >$DEMO_HOME/breakfast/base/kustomization.yaml
|
cat <<EOF >$DEMO_HOME/breakfast/base/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
resources:
|
||||||
- coffee.yaml
|
- coffee.yaml
|
||||||
- pancakes.yaml
|
- pancakes.yaml
|
||||||
@@ -71,8 +69,6 @@ likes her coffee hot:
|
|||||||
mkdir -p $DEMO_HOME/breakfast/overlays/alice
|
mkdir -p $DEMO_HOME/breakfast/overlays/alice
|
||||||
|
|
||||||
cat <<EOF >$DEMO_HOME/breakfast/overlays/alice/kustomization.yaml
|
cat <<EOF >$DEMO_HOME/breakfast/overlays/alice/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
commonLabels:
|
commonLabels:
|
||||||
who: alice
|
who: alice
|
||||||
bases:
|
bases:
|
||||||
@@ -96,8 +92,6 @@ And likewise a [variant] for Bob, who wants _five_ pancakes, with strawberries:
|
|||||||
mkdir -p $DEMO_HOME/breakfast/overlays/bob
|
mkdir -p $DEMO_HOME/breakfast/overlays/bob
|
||||||
|
|
||||||
cat <<EOF >$DEMO_HOME/breakfast/overlays/bob/kustomization.yaml
|
cat <<EOF >$DEMO_HOME/breakfast/overlays/bob/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
commonLabels:
|
commonLabels:
|
||||||
who: bob
|
who: bob
|
||||||
bases:
|
bases:
|
||||||
|
|||||||
@@ -158,8 +158,6 @@ height=10m
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >$DEMO_HOME/base/kustomization.yaml
|
cat <<EOF >$DEMO_HOME/base/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
- name: my-configmap
|
- name: my-configmap
|
||||||
files:
|
files:
|
||||||
@@ -193,8 +191,6 @@ dbpassword=mothersMaidenName
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >$OVERLAYS/development/kustomization.yaml
|
cat <<EOF >$OVERLAYS/development/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- ../../base
|
- ../../base
|
||||||
namePrefix: dev-
|
namePrefix: dev-
|
||||||
@@ -277,8 +273,6 @@ dbpassword=thisShouldProbablyBeInASecretInstead
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >$OVERLAYS/production/kustomization.yaml
|
cat <<EOF >$OVERLAYS/production/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- ../../base
|
- ../../base
|
||||||
namePrefix: prod-
|
namePrefix: prod-
|
||||||
|
|||||||
@@ -39,8 +39,6 @@ curl -s -o "$BASE/#1.yaml" "https://raw.githubusercontent.com\
|
|||||||
/{deployment,service}.yaml"
|
/{deployment,service}.yaml"
|
||||||
|
|
||||||
cat <<'EOF' >$BASE/kustomization.yaml
|
cat <<'EOF' >$BASE/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
commonLabels:
|
commonLabels:
|
||||||
app: hello
|
app: hello
|
||||||
resources:
|
resources:
|
||||||
@@ -61,8 +59,6 @@ OVERLAYS=$DEMO_HOME/overlays
|
|||||||
mkdir -p $OVERLAYS/staging
|
mkdir -p $OVERLAYS/staging
|
||||||
|
|
||||||
cat <<'EOF' >$OVERLAYS/staging/kustomization.yaml
|
cat <<'EOF' >$OVERLAYS/staging/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
namePrefix: staging-
|
namePrefix: staging-
|
||||||
nameSuffix: -v1
|
nameSuffix: -v1
|
||||||
commonLabels:
|
commonLabels:
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ Create a kustomization and add a ConfigMap generator to it.
|
|||||||
<!-- @createCMGenerator @test -->
|
<!-- @createCMGenerator @test -->
|
||||||
```
|
```
|
||||||
cat > $DEMO_HOME/kustomization.yaml << EOF
|
cat > $DEMO_HOME/kustomization.yaml << EOF
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
- name: my-configmap
|
- name: my-configmap
|
||||||
literals:
|
literals:
|
||||||
|
|||||||
@@ -142,8 +142,6 @@ defining a new name prefix, and some different labels.
|
|||||||
<!-- @makeStagingKustomization @test -->
|
<!-- @makeStagingKustomization @test -->
|
||||||
```
|
```
|
||||||
cat <<'EOF' >$OVERLAYS/staging/kustomization.yaml
|
cat <<'EOF' >$OVERLAYS/staging/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
namePrefix: staging-
|
namePrefix: staging-
|
||||||
commonLabels:
|
commonLabels:
|
||||||
variant: staging
|
variant: staging
|
||||||
@@ -185,8 +183,6 @@ with a different name prefix and labels.
|
|||||||
<!-- @makeProductionKustomization @test -->
|
<!-- @makeProductionKustomization @test -->
|
||||||
```
|
```
|
||||||
cat <<EOF >$OVERLAYS/production/kustomization.yaml
|
cat <<EOF >$OVERLAYS/production/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
namePrefix: production-
|
namePrefix: production-
|
||||||
commonLabels:
|
commonLabels:
|
||||||
variant: production
|
variant: production
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
# Example configuration for the webserver
|
# Example configuration for the webserver
|
||||||
# at https://github.com/monopole/hello
|
# at https://github.com/monopole/hello
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
commonLabels:
|
commonLabels:
|
||||||
app: hello
|
app: hello
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ Make a `kustomization` containing a pod resource
|
|||||||
<!-- @createKustomization @test -->
|
<!-- @createKustomization @test -->
|
||||||
```
|
```
|
||||||
cat <<EOF >$DEMO_HOME/kustomization.yaml
|
cat <<EOF >$DEMO_HOME/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
resources:
|
||||||
- pod.yaml
|
- pod.yaml
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ Make a `kustomization` containing an ingress resource.
|
|||||||
DEMO_HOME=$(mktemp -d)
|
DEMO_HOME=$(mktemp -d)
|
||||||
|
|
||||||
cat <<EOF >$DEMO_HOME/kustomization.yaml
|
cat <<EOF >$DEMO_HOME/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
resources:
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
resources:
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- ../../base
|
- ../../base
|
||||||
patchesStrategicMerge:
|
patchesStrategicMerge:
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- ../../base
|
- ../../base
|
||||||
patchesStrategicMerge:
|
patchesStrategicMerge:
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ BASE=$DEMO_HOME/base
|
|||||||
mkdir $BASE
|
mkdir $BASE
|
||||||
|
|
||||||
cat <<EOF >$BASE/kustomization.yaml
|
cat <<EOF >$BASE/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
resources:
|
||||||
- pod.yaml
|
- pod.yaml
|
||||||
EOF
|
EOF
|
||||||
@@ -49,8 +47,6 @@ DEV=$DEMO_HOME/dev
|
|||||||
mkdir $DEV
|
mkdir $DEV
|
||||||
|
|
||||||
cat <<EOF >$DEV/kustomization.yaml
|
cat <<EOF >$DEV/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- ./../base
|
- ./../base
|
||||||
namePrefix: dev-
|
namePrefix: dev-
|
||||||
@@ -64,8 +60,6 @@ STAG=$DEMO_HOME/staging
|
|||||||
mkdir $STAG
|
mkdir $STAG
|
||||||
|
|
||||||
cat <<EOF >$STAG/kustomization.yaml
|
cat <<EOF >$STAG/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- ./../base
|
- ./../base
|
||||||
namePrefix: stag-
|
namePrefix: stag-
|
||||||
@@ -79,8 +73,6 @@ PROD=$DEMO_HOME/production
|
|||||||
mkdir $PROD
|
mkdir $PROD
|
||||||
|
|
||||||
cat <<EOF >$PROD/kustomization.yaml
|
cat <<EOF >$PROD/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- ./../base
|
- ./../base
|
||||||
namePrefix: prod-
|
namePrefix: prod-
|
||||||
@@ -91,8 +83,6 @@ Then define a _Kustomization_ composing three variants together:
|
|||||||
<!-- @makeTopLayer @test -->
|
<!-- @makeTopLayer @test -->
|
||||||
```
|
```
|
||||||
cat <<EOF >$DEMO_HOME/kustomization.yaml
|
cat <<EOF >$DEMO_HOME/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- ./dev
|
- ./dev
|
||||||
- ./staging
|
- ./staging
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
resources:
|
||||||
- pod.yaml
|
- pod.yaml
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- ./../base
|
- ./../base
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- ./dev
|
- ./dev
|
||||||
- ./staging
|
- ./staging
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- ./../base
|
- ./../base
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- ./../base
|
- ./../base
|
||||||
|
|
||||||
|
|||||||
@@ -34,8 +34,6 @@ A base can also be specified as a URL:
|
|||||||
DEMO_HOME=$(mktemp -d)
|
DEMO_HOME=$(mktemp -d)
|
||||||
|
|
||||||
cat <<EOF >$DEMO_HOME/kustomization.yaml
|
cat <<EOF >$DEMO_HOME/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- github.com/kubernetes-sigs/kustomize//examples/multibases?ref=v1.0.6
|
- github.com/kubernetes-sigs/kustomize//examples/multibases?ref=v1.0.6
|
||||||
namePrefix: remote-
|
namePrefix: remote-
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- ../../base
|
- ../../base
|
||||||
patchesStrategicMerge:
|
patchesStrategicMerge:
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- ../../base
|
- ../../base
|
||||||
namePrefix: staging-
|
namePrefix: staging-
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
resources:
|
||||||
- resources.yaml
|
- resources.yaml
|
||||||
|
|
||||||
|
|||||||
@@ -49,8 +49,6 @@ Create a new kustomization with two bases:
|
|||||||
<!-- @createKustomization @test -->
|
<!-- @createKustomization @test -->
|
||||||
```
|
```
|
||||||
cat <<EOF >$DEMO_HOME/kustomization.yaml
|
cat <<EOF >$DEMO_HOME/kustomization.yaml
|
||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- wordpress
|
- wordpress
|
||||||
- mysql
|
- mysql
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
bases:
|
bases:
|
||||||
- wordpress
|
- wordpress
|
||||||
- mysql
|
- mysql
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
resources:
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
resources:
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user