Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dtantsur
Copy link
Member

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

@metal3-io-bot metal3-io-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 19, 2024
@metal3-io-bot metal3-io-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 19, 2024
@metal3-io-bot metal3-io-bot added needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 25, 2024
@dtantsur dtantsur added this to the MVP milestone Nov 27, 2024
@metal3-io-bot metal3-io-bot removed the needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. label Nov 27, 2024
@dtantsur dtantsur changed the title [WIP] Add support for overrides for generated pods ✨ Add support for overrides for generated pods Nov 28, 2024
@metal3-io-bot metal3-io-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2024
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>
Copy link
Member

@tuminoid tuminoid left a 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
Copy link
Member

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?

pkg/ironic/utils.go Show resolved Hide resolved
Copy link
Member

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?

@metal3-io-bot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 9, 2024
@metal3-io-bot
Copy link
Contributor

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.

@metal3-io-bot metal3-io-bot added the needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. label Dec 20, 2024
@dtantsur dtantsur removed this from the IrSO MVP milestone Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants