Kustomize plugins previously used at GoAbout.
Note: these plugins only work for some older kustomize commits around kustomize 2. For a plugin for Kustomize 3+, see kustomize-sopssecret-plugin.
kustomize build --enable_alpha_goplugins_accept_panic_risk
Set secret key-values from a sops-encrypted dotenv file.
OUTDIR=${XDG_CONFIG_HOME:-$HOME/.config}/kustomize/plugins/kvSources
go build -buildmode plugin -o $OUTDIR/sopsdotenv.so sopsdotenv/main.go
secretGenerator:
- name: example
kvSources:
- name: sopsdotenv
pluginType: go
args:
- somefile.sops.env
Create secret entries from sops-encrypted files.
OUTDIR=${XDG_CONFIG_HOME:-$HOME/.config}/kustomize/plugins/kvSources
go build -buildmode plugin -o $OUTDIR/sopsfiles.so sopsfiles/main.go
secretGenerator:
- name: example
kvSources:
- name: sopsfiles
pluginType: go
args:
- somefile.txt=somefile.sops.txt
docker build -t goabout/goabout-kustomize-plugins .
cid=$(docker create goabout/k8s-infra-deploy)
docker cp $cid:/usr/local/bin/kustomize .
docker cp $cid:/root/.config/kustomize/plugin/kvSources ${XDG_CONFIG_HOME:-$HOME/.config}/kustomize/plugin