Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
add secrets config and vault secret actions #22
add secrets config and vault secret actions #22
Changes from 22 commits
cbb502a
093635e
198d404
9866c7e
b046407
cd3f3e5
c6b4393
db8ebfc
e99ffdf
412bc72
773e5d7
d723010
5a160b3
6a6b772
6905152
e9905ac
139348b
1fed64f
07636a9
cf0a47e
398bbfd
45a7fee
c36333e
e8dce0b
2812d5b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
what if we called it environment.yaml (since not all envs are secrets, but all secrets are envs)
what if we put env as root:
or a more k8s-ish syntax
or a more compact form of this:
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.
Agreed. I went with the low impact change, as I'd like to avoid having the config look k8s-ish, and the compact form might have readability issues.
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.
question: the key here matches both the key in the secret and the name of the environment variable right? I think there might be cases when that could be annoying because as a developer you are obliged to use an env that you might not know from the beginning
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.
Not sure I understand but yes the key in the secret must match the key that the user specified in their code. What would be an alternative?
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.
this is a bit related to the convo Amber touched on. People who set secrets should in general be different from the ones who write the code. So in the code you know you need some environment variable, but you should be able to call it whatever you want (say
MY_ENV
). Similarly, the person who writes the secret, can put a whatever key (saymy_secret
). Only at the moment of the deployment, you should say: loadmy_secret
value intoMY_ENV
. We should not assume that the programmer knows that the key ismy_secret
and doos.getenv('my_secret')
from the beginning.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.
Good point. So for juju and Vault, I guess we will need to add an optional key of what the env variable name should be? Something like:
Or it could be (I like this more):
Any suggestions?
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.
that is fine, but then i think you would need to keep the env consistent: