-
Notifications
You must be signed in to change notification settings - Fork 133
Skip finalizers for non-MCM nodes #1065
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
Conversation
aaronfern
left a comment
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.
Thanks for the quick fix!
some small comments, please address them
| return nil | ||
| } | ||
|
|
||
| // Avoid handling nodes not managed by MCM. |
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.
Could you please elaborate this comment similar to what you added in updateNode()?
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.
Added a more detailed comment
| // Avoid handling nodes not managed by MCM. | ||
| if _, err := c.getMachineFromNode(node.Name); err != nil { | ||
| if errors.Is(err, errNoMachineMatch) { | ||
| klog.V(4).Infof("ClusterNode %q: No machine found matching node, skipping adding finalizers", key) |
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 should be an error log and not an info log
|
Can you also edit the release note to say the following |
takoverflow
left a comment
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.
Just one clarification requested PTAL
Thanks for the PR, the changes seem fine to me.
|
LGTM label has been added. DetailsGit tree hash: 00c1d0d91fbf2c6e3bcf8a749661da66239633ef |
aaronfern
left a comment
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.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aaronfern, takoverflow The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
LGTM label has been added. DetailsGit tree hash: 87e80c3b2eb0a3bb76e683da413b7d1239a33874 |
What this PR does / why we need it:
This PR ensures that finalizers are not added to non-MCM nodes lacking the
NotManagedByMCMannotation, as this can lead to testing issues in kubernetes environments.This is done by verifying that an associated machine exists for the node before adding finalizers.
Changes:
hasNodeFinalizerBeenRemoved) with a direct check for the presence of the finalizerSpecial notes for your reviewer:
IT logs
Release note: