-
Notifications
You must be signed in to change notification settings - Fork 344
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 backend support for Kubernetes secrets environment variables #2715
Merged
Merged
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
b723a1c
Add backend support for Kubernetes secrets-based env vars
kiersten-stokes 7b66723
Fix server tests
kiersten-stokes 7e0592e
Address review: docstring and resource name-checking
kiersten-stokes 2a36791
Update snapshots
kiersten-stokes 6568f5c
Fix lint
kiersten-stokes e2fcc3b
Define data classes for secrets and mounted volumes
kiersten-stokes b954d47
Update tests
kiersten-stokes bc09462
Add test for secret formatting
kiersten-stokes 029d2d6
Refactor calls to get mounts/secrets into static methods
kiersten-stokes ed5eb35
Standardize env_var as the placeholder for env var names
kiersten-stokes 4de9bd6
Add new function to check for the format of secret key
kiersten-stokes c49a939
Fix lint
kiersten-stokes dc5b06a
Move certain secret and volume logic to validation service
kiersten-stokes 8fc3645
Update and add tests
kiersten-stokes 8daa10a
Coerce volume and secret kv-lists into lists of objects early
kiersten-stokes e658423
Refactor convert_kv_properties to return if already converted
kiersten-stokes a320e16
Update property template descriptions
kiersten-stokes 5ac3f6e
Update docs with info on secrets
kiersten-stokes 7d28e11
Add info about validation of secrets and volumes to docs
kiersten-stokes 121cd85
Update properties json resource to reflect template update
kiersten-stokes 798a419
Address code review
kiersten-stokes f24ca9b
Address documentation review
kiersten-stokes 50a228f
Fix lint
kiersten-stokes c809f58
Remove test_processor_base
kiersten-stokes dec4a8b
Add test for env vars and secret duplicate keys
kiersten-stokes 2e6924b
Make documentation topic more action-oriented
kiersten-stokes 9ad4fff
Adjust import statements for dataclasses
kiersten-stokes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Kubernetes secrets can also be mounted as volumes. In case we also support that in a future release we should probably pick a more discriminating variable name now that makes it possible to distinguish between secrets that are exposed as an env variable and secrets that are mounted as a volume.
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.
When "mounted as a volume" are those particular, secret-based, PV definitions differentiated from regular PV definitions? That is, do we need to have an additional "type" of mount or secret?
I agree that a distinguishing name for the env-based field is probably warranted. Just curious about how distinguishing things are.
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.
Yeah totally agree about the distinguishing names - I was thinking that during the discussion yesterday.
I believe the two different types are consumed/accessed in completely different ways, making an additional type unnecessary. But I may be misunderstanding, so I'd defer to @ptitzler expertise
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.
In the running container this is exposed like other volumes are. afaik the consumer does not have any awareness what the source is, just like the consumer doesn't know wether an env variable value was derived from a constant or a kubernetes resource/secret. I haven't tested what happens if one tries to mount a volume and a secret to the same mount point in the container, but would expect it to fail.