Skip to content

[feat] Ability to load secrets from environment variables #6489

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

Closed
gothka opened this issue Aug 23, 2021 · 5 comments · Fixed by #6632
Closed

[feat] Ability to load secrets from environment variables #6489

gothka opened this issue Aug 23, 2021 · 5 comments · Fixed by #6632
Labels

Comments

@gothka
Copy link

gothka commented Aug 23, 2021

Hey! Since docker v20.10.x there's a way to load docker secret using env vars when buildkit is enabled. Can it supported by skaffold? I can't find any reference in the docs, but i found this allowing to read secrets from a file.

@alex-dixon
Copy link

I think this may help with #6079 also, where users are looking to reference a secret in the home directory but cannot expand env vars like $HOME.

@ahmetb
Copy link
Contributor

ahmetb commented Sep 13, 2021

@abhishiekgowtham this seems doable if we can add env: field and make it mutually exclusive with src: in the linked schema section.

@alex-dixon I doubt this help with variable expansion in src: field but you could do export MY_ENV="$(cat $HOME/file)" while running skaffold (with a tool like direnv)?

@gothka
Copy link
Author

gothka commented Sep 27, 2021

Thanks for working/adding the feature @ahmetb! 👍

@ahmetb
Copy link
Contributor

ahmetb commented Sep 27, 2021

@abhishiekgowtham no problem! have you had a chance to build from the repo and try it out?

@gothka
Copy link
Author

gothka commented Oct 12, 2021

Yes, it actually seems to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants