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

[release-4.13][manual] kubeletconfig: ignore nonmatching kubeletconfig objects #906

Merged
merged 5 commits into from
Apr 3, 2024

Conversation

ffromani
Copy link
Member

@ffromani ffromani commented Apr 2, 2024

This is a manual cherry-pick of #903

fix copy/paste mistake which triggered reconciliation with
the wrong key.

Signed-off-by: Francesco Romani <fromani@redhat.com>
(cherry picked from commit 4e4c92c)
(cherry picked from commit 6466e2f)
In 3caa829 we added support to handle gracefully payload-less
kubeletconfig objects. There's however another issue lurking:
we can have multiple kubeletconfig objects.

Previously, the code was incorrectly assuming there is at most
one kubeletconfig object in the cluster, targeting the MCP
worker pool.

But we can actually have more kubeletconfig objects as long
as they don't target overlapping MCPs (e.g. with 2 MCPs we can
have 2 kubeletconfig objects, say, or perhaps even 4 considering
payloadles objects).

Thus, we need to fix our matching logic to handle this occurrence.
The fix is simple: just look for kubeletconfig which we target
NodeGroups we are interested into, silently skipping everything else.

e2e tests are pending and will be added in a separate commit.

Signed-off-by: Francesco Romani <fromani@redhat.com>
(cherry picked from commit ee717aa)
add labels to easily infer which MCP and which NROP
instance are linked to a generated configmap

The OwnerReference is already correctly set to
handle the cascading delete, we need more soft links
between objects and labels seems a good and natural fit.

We plan to use these labels for troubleshooting and
in the e2e tests.

Signed-off-by: Francesco Romani <fromani@redhat.com>
(cherry picked from commit ada1095)
add e2e tests to make sure the nonmatching kubeletconfigs
(e.g. kubeletconfigs which are not linked to NodeGroups
the operator monitors) are safely skipped.

Signed-off-by: Francesco Romani <fromani@redhat.com>
(cherry picked from commit f7e4d06)
@openshift-ci openshift-ci bot requested review from mrniranjan and Tal-or April 2, 2024 13:56
Copy link
Contributor

openshift-ci bot commented Apr 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ffromani

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 2, 2024
@ffromani
Copy link
Member Author

ffromani commented Apr 2, 2024

/cherry-pick release-4.12

@openshift-cherrypick-robot

@ffromani: once the present PR merges, I will cherry-pick it on top of release-4.12 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.12

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/test-infra repository.

Fix usage of the API - the code was using too modern
idioms, backport to older version.

Signed-off-by: Francesco Romani <fromani@redhat.com>
@ffromani ffromani requested a review from shajmakh April 2, 2024 16:09
@ffromani ffromani merged commit eab3376 into release-4.13 Apr 3, 2024
6 of 7 checks passed
@ffromani ffromani deleted the manual-cherry-pick-903-to-release-4.13 branch April 3, 2024 06:33
@openshift-cherrypick-robot

@ffromani: new pull request created: #907

In response to this:

/cherry-pick release-4.12

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/test-infra repository.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants