mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Rename KustomizationPatch to Component
The main change in this commit is that we rename the `KustomizationPatch` kind to `Component`, and use the appropriate group and API version (`kustomize.config.k8s.io/v1alpha1`).
This commit is contained in:
committed by
Alex Pyrgiotis
parent
5884290fff
commit
6951623dd0
@@ -60,6 +60,9 @@ BASE=$DEMO_HOME/base
|
|||||||
mkdir $BASE
|
mkdir $BASE
|
||||||
|
|
||||||
cat <<EOF >$BASE/kustomization.yaml
|
cat <<EOF >$BASE/kustomization.yaml
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
|
|
||||||
@@ -465,15 +468,16 @@ spec:
|
|||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
Define an `external_db` component, using `kind: v1alpha1/KustomizationPatch`,
|
Define an `external_db` component, using `kind: Component`, that creates a
|
||||||
that creates a `Secret` for the DB password and a new entry in the `ConfigMap`:
|
`Secret` for the DB password and a new entry in the `ConfigMap`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
EXT_DB=$DEMO_HOME/components/external_db
|
EXT_DB=$DEMO_HOME/components/external_db
|
||||||
mkdir -p $EXT_DB
|
mkdir -p $EXT_DB
|
||||||
|
|
||||||
cat <<EOF >$EXT_DB/kustomization.yaml
|
cat <<EOF >$EXT_DB/kustomization.yaml
|
||||||
kind: v1alpha1/KustomizationPatch # <-- Component notation
|
apiVersion: kustomize.config.k8s.io/v1alpha1 # <-- Component notation
|
||||||
|
kind: Component
|
||||||
|
|
||||||
secretGenerator:
|
secretGenerator:
|
||||||
- name: dbpass
|
- name: dbpass
|
||||||
@@ -528,7 +532,8 @@ LDAP=$DEMO_HOME/components/ldap
|
|||||||
mkdir -p $LDAP
|
mkdir -p $LDAP
|
||||||
|
|
||||||
cat <<EOF >$LDAP/kustomization.yaml
|
cat <<EOF >$LDAP/kustomization.yaml
|
||||||
kind: v1alpha1/KustomizationPatch
|
apiVersion: kustomize.config.k8s.io/v1alpha1
|
||||||
|
kind: Component
|
||||||
|
|
||||||
secretGenerator:
|
secretGenerator:
|
||||||
- name: ldappass
|
- name: ldappass
|
||||||
@@ -582,7 +587,8 @@ RECAPTCHA=$DEMO_HOME/components/recaptcha
|
|||||||
mkdir -p $RECAPTCHA
|
mkdir -p $RECAPTCHA
|
||||||
|
|
||||||
cat <<EOF >$RECAPTCHA/kustomization.yaml
|
cat <<EOF >$RECAPTCHA/kustomization.yaml
|
||||||
kind: v1alpha1/KustomizationPatch
|
apiVersion: kustomize.config.k8s.io/v1alpha1
|
||||||
|
kind: Component
|
||||||
|
|
||||||
secretGenerator:
|
secretGenerator:
|
||||||
- name: recaptcha
|
- name: recaptcha
|
||||||
@@ -629,7 +635,7 @@ data:
|
|||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
Define a `community` overlay, that bundles the external DB and reCAPTCHA
|
Define a `community` variant, that bundles the external DB and reCAPTCHA
|
||||||
components:
|
components:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|||||||
Reference in New Issue
Block a user