This is a KRM Function that generates Kubernetes Secrets from Google Secret Manager secret versions.
Due to mounting issues with containerized functions, the generator should be run as an exec function (for now). The Google credentials for fetching the secret version are found using Application Default Credentials.
apiVersion: kustomize.reinoud.dev/v1
kind: GoogleSecretManagerSecretGenerator
metadata:
name: not-important
annotations:
config.kubernetes.io/function: |
exec:
path: ../../build/krm-google-secret-manager
spec:
name: example
project:
secrets:
- key: example-key
source: projects/<your-project>/secrets/<your-secret>/versions/latest
See more details in examples/exec
Simply call make
to build the function and store the binary in build/
.