-
Notifications
You must be signed in to change notification settings - Fork 8
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 support for overrides for generated pods #75
base: main
Are you sure you want to change the base?
Conversation
This change adds a new field Overrides to both Ironic and IronicDatabase. This field allows advanced operators and downstream consumers to inject containers, annotations, labels and environment variables into the generated deployments/daemon sets. A new feature gate Overrides is added to protect this feature. Signed-off-by: Dmitry Tantsur <dtantsur@protonmail.com>
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.
Couple questions, generally looking solid.
/approve
// Merge maps, keys from m1 have priority over ones from m2. | ||
func mergeMaps[M ~map[K]V, K, V comparable](m1 M, m2 M) M { | ||
if m2 == nil { | ||
return m1 |
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.
We return m1
here as is, vs retuning a clone+copy (new instances) in other case. Can this lead to issues?
If not, should we also make similar check for m1 == nil, and return m2 directly?
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.
Would we need to have a test case for checking mixing Env and EnvFrom overrides?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tuminoid The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
This change adds a new field Overrides to both Ironic and
IronicDatabase. This field allows advanced operators and downstream
consumers to inject containers, annotations, labels and environment
variables into the generated deployments/daemon sets.
A new feature gate Overrides is added to protect this feature.
Signed-off-by: Dmitry Tantsur dtantsur@protonmail.com