-
Notifications
You must be signed in to change notification settings - Fork 75
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
Feature/inject init containers #8
Feature/inject init containers #8
Conversation
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 looks great @iwilltry42 ! @zach-dunton-sf just opened up #9 to do the same, and there are useful features (fixes to annotation escaping in patches, and unit test refactors) in both PRs that I feel should be merged. Mind coordinating to negotiate which gets merged in?
@zach-dunton-sf can I merge your changes regarding annotations into this PR? That way we can have all the functionality without having to mess with merge conflicts. And as far as I can see, our changes regarding the injection of initContainers are fairly similar. |
@byxorna I pasted @zach-dunton-sf 's changes regarding annotations into my branch 👍 |
@iwilltry42 ok, thanks for all this! I am merging and will cut a new release in a bit; you can use the |
What and why?
Note: this PR assumes that the hostAliases PR got merged already (too lazy for some more merges).
Note 2: I "simplified" adding tests in
internal/pkg/config/config_test.go
similar to how it's done inloader_test.go
.Functionality to add initContainers, because they're quite useful sometimes and some functionality, that we currently execute in sidecar containers may only be needed once at the start of a pod.
This works similar to the injection of "normal" containers, meaning that, if there's a name conflict between injection config and the requesting podSpec, the server will return a
Duplicate Value
error.Testing Steps
Tested with debug-pod that requests an injection with one initContainer in it.
Configs of debug-pod tested:
Same unittests as usual.
Reviewers
Required reviewers:
@byxorna
Request reviews from other people you want to review this PR in the "Reviewers" section on the right.