Skip to content

Commit adb196d

Browse files
author
bob.rohan
committed
#328 Decrypt base64 encoded SOPS encrypted secrets #328
add Kustomize secretGenerator steps to docs Signed-off-by: Bob Rohan <bob.rohan@hodge.co.uk>
1 parent a7e7613 commit adb196d

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/spec/v1beta1/kustomization.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,25 @@ spec:
962962
name: sops-age
963963
```
964964

965+
### Kustomize secretGenerator
966+
967+
`sops` encrypted data can be stored as a base64 encoded Secret, which enables use of kustomize secretGenerator as follows.
968+
969+
```console
970+
$ echo "day=Tuesday" | sops -e /dev/stdin > day.txt.encrypted
971+
$ cat <<EOF > kustomization.yaml
972+
apiVersion: kustomize.config.k8s.io/v1beta1
973+
kind: Kustomization
974+
975+
secretGenerator:
976+
- name: day-secret
977+
files:
978+
- ./day.txt.encrypted
979+
EOF
980+
```
981+
982+
Commit and push `day.txt.encrypted` and `kustomization.yaml` to Git.
983+
965984
## Status
966985

967986
When the controller completes a Kustomization apply, reports the result in the `status` sub-resource.

0 commit comments

Comments
 (0)