-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOPS: Decrypt dotenv files used in kustomize secret generator #463
Conversation
d19b575
to
db50457
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @somtochiama 🌹
PS. I'll do a followup PR to the API docs and website and add examples for dotenv files.
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
db50457
to
84a88d5
Compare
Guys, is this functionality works only with secretGenerator or with configMapGenerator too? |
@danufr I have not tried it, but from reading: I would say it looks to me like this feature only works with I think there's a principled stance that it should not work for configmap generators either, as it would be improper to take secret data that was stored as encrypted and store it in a non-secret "configmap" which is not handled as a secret, then provide access to folks who are not authorized to read secrets... this is a way for privilege to escalate and information to leak out from those securely encrypted sources. Anyway, at present the code paths are such that I think it will definitely not work. |
This PR adds support for decrypting dotenv files (encrypted with SOPS) that are used with kustomize secret generator.
Example
Create an env file:
Encrypt it with SOPS:
Create a kustomization.yaml that generates an env secret:
Configure Flux to decrypt the secret before apply:
Ref: fluxcd/flux2#779