mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-09-15 12:18:57 +00:00
Revamp the components example
Standardize on `patchesStrategicMerge` and `patchesJSON6902` instead of `patches` in kustomization files. Also, add example commands to create local input files for existing SecretGenerators. Signed-off-by: Ioannis Androulidakis <ioannis@arrikto.com>
This commit is contained in:
@@ -127,10 +127,10 @@ secretGenerator:
|
|||||||
- site_key.txt
|
- site_key.txt
|
||||||
- secret_key.txt
|
- secret_key.txt
|
||||||
|
|
||||||
patches:
|
patchesStrategicMerge:
|
||||||
- configmap.yaml
|
- configmap.yaml
|
||||||
|
|
||||||
patches:
|
patchesJson6902:
|
||||||
- target:
|
- target:
|
||||||
group: apps
|
group: apps
|
||||||
version: v1
|
version: v1
|
||||||
@@ -182,6 +182,23 @@ data:
|
|||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Create local input files for external DB's password and reCAPTCHA's keys:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
|
||||||
|
cat <<EOF >$COMMUNITY/dbpass.txt
|
||||||
|
dbpass
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF >$COMMUNITY/site_key.txt
|
||||||
|
sitekey
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF >$COMMUNITY/secret_key.txt
|
||||||
|
secretkey
|
||||||
|
EOF
|
||||||
|
```
|
||||||
|
|
||||||
Define a **enterprise** overlay that:
|
Define a **enterprise** overlay that:
|
||||||
|
|
||||||
- generates `Secrets` for LDAP's password and external DB's password
|
- generates `Secrets` for LDAP's password and external DB's password
|
||||||
@@ -208,10 +225,10 @@ secretGenerator:
|
|||||||
files:
|
files:
|
||||||
- dbpass.txt
|
- dbpass.txt
|
||||||
|
|
||||||
patches:
|
patchesStrategicMerge:
|
||||||
- configmap.yaml
|
- configmap.yaml
|
||||||
|
|
||||||
patches:
|
patchesJson6902:
|
||||||
- target:
|
- target:
|
||||||
group: apps
|
group: apps
|
||||||
version: v1
|
version: v1
|
||||||
@@ -263,6 +280,19 @@ data:
|
|||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Create local input files for LDAP's password and external DB's password:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
|
||||||
|
cat <<EOF >$ENTERPRISE/ldappass.txt
|
||||||
|
ldappass
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF >$ENTERPRISE/dbpass.txt
|
||||||
|
dbpass
|
||||||
|
EOF
|
||||||
|
```
|
||||||
|
|
||||||
Define a **dev** overlay that supports all three features(ExternalDB, LDAP,
|
Define a **dev** overlay that supports all three features(ExternalDB, LDAP,
|
||||||
reCAPTCHA) and conditionally enables some or all of them. In this example, we
|
reCAPTCHA) and conditionally enables some or all of them. In this example, we
|
||||||
define a dev overlay that supports all the features, but has disabled the LDAP
|
define a dev overlay that supports all the features, but has disabled the LDAP
|
||||||
@@ -296,10 +326,10 @@ secretGenerator:
|
|||||||
- site_key.txt
|
- site_key.txt
|
||||||
- secret_key.txt
|
- secret_key.txt
|
||||||
|
|
||||||
patches:
|
patchesStrategicMerge:
|
||||||
- configmap.yaml
|
- configmap.yaml
|
||||||
|
|
||||||
patches:
|
patchesJson6902:
|
||||||
- target:
|
- target:
|
||||||
group: apps
|
group: apps
|
||||||
version: v1
|
version: v1
|
||||||
@@ -367,6 +397,23 @@ data:
|
|||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Create local input files for external DB's password and reCAPTCHA's keys:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
|
||||||
|
cat <<EOF >$DEV/dbpass.txt
|
||||||
|
dbpass
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF >$DEV/site_key.txt
|
||||||
|
sitekey
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF >$DEV/secret_key.txt
|
||||||
|
secretkey
|
||||||
|
EOF
|
||||||
|
```
|
||||||
|
|
||||||
The above commands result in the following structure:
|
The above commands result in the following structure:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|||||||
Reference in New Issue
Block a user