-
Notifications
You must be signed in to change notification settings - Fork 33
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
Allow env mapping for secrets #100
base: master
Are you sure you want to change the base?
Allow env mapping for secrets #100
Conversation
4bd0456
to
30879e0
Compare
This was previously not possible. This is a non breaking way of fixing cruise-automation#99. Other ways would introduce breaking changes to variable names. Additional features: * allow to rename secret keys in env variables (see https://github.com/cruise-automation/daytona/issues/99\#issuecomment-1492390145) * allow to store selected secret keys as env variables and in a file
30879e0
to
46dfae9
Compare
@@ -285,7 +303,7 @@ func (sd *SecretDefinition) addSecrets(secretResult *SecretResult) error { | |||
return fmt.Errorf("vault listed a secret %s %s, but failed trying to read it; likely the rate-limiting retry attempts were exceeded", keyName, keyPath) | |||
} | |||
|
|||
if !sd.plural && sd.outputDestination != "" { | |||
if !sd.plural && sd.outputDestination != "" && len(sd.secretEnvMapping) == 0 { |
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.
my initial approach was just to remove sd.outputDestination
but that would make many tests fail, which means that the current API would be broken.
Instead I decided to make this non-breaking change, which doesn't fix the bug, but at least allows for setting environment vairables.
Can we please limit this to the problem described in #99 and attempt to solve vault key re-mapping in a separate PR? We may want to add this capability to an upcoming 2.0.0 release. Thank you! |
Got it! I opened a new PR #101. |
This was previously not possible.
This is a non breaking way of fixing #99.
Other ways would introduce breaking changes to variable names.
Additional features:
Example: