feat: Support injection into user-defined init containers #55
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.
This PR addresses the issue #49 and introduces support for injecting secrets into user-defined init containers using the 1Password Kubernetes Secrets Injector.
Background
The 1Password Kubernetes Secrets Injector does not currently support injecting secrets into user-defined init containers, as its init container is appended to the pod specification and runs after all user-defined init containers. This causes the 1Password CLI binary and command modifications to be unavailable during the execution of user-defined init containers.
Key Changes
operator.1password.io/injector-init-first: "true"
(defaults to false)true
, the injector prepends its init container as the first init container.operator.1password.io/inject
annotation are also mutated to enable secret injection.webhook.go
to handle the new annotation logic.