-
Notifications
You must be signed in to change notification settings - Fork 27
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
Removing kmod labels without appropriate tolerations #944
Removing kmod labels without appropriate tolerations #944
Conversation
Hi @TomerNewman. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
✅ Deploy Preview for kubernetes-sigs-kmm ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/ok-to-test |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #944 +/- ##
==========================================
- Coverage 79.09% 72.68% -6.42%
==========================================
Files 51 65 +14
Lines 5109 5762 +653
==========================================
+ Hits 4041 4188 +147
- Misses 882 1395 +513
+ Partials 186 179 -7 ☔ View full report in Codecov by Sentry. |
47fe591
to
1310c3d
Compare
1310c3d
to
90f06b2
Compare
90f06b2
to
5bf1f5e
Compare
@@ -167,7 +167,7 @@ func (r *NMCReconciler) Reconcile(ctx context.Context, req reconcile.Request) (r | |||
|
|||
// removing label of loaded kmods | |||
if !r.nodeAPI.IsNodeSchedulable(&node, nil) { |
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.
using IsNodeSchedulable with nil will always return true, so we can simply delete this "if" clause. But i suggest that we actually collect the modules that are not schedulable on the node at line 139, and then we just delete their labels at this line (169). This way it also means that we don't need the whole node-taints-tolerations loop again in the RemoveNodeReadyLabels function
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.
good idea
c9603ee
to
0b37a9a
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: TomerNewman, ybettan 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 |
@@ -128,14 +128,15 @@ func (r *NMCReconciler) Reconcile(ctx context.Context, req reconcile.Request) (r | |||
} | |||
|
|||
errs := make([]error, 0, len(nmcObj.Spec.Modules)+len(nmcObj.Status.Modules)) | |||
|
|||
var labelsToRemove []string |
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.
WDYT about changing the variable's name to readyLabelsToRemove
This change addresses kubernetes-sigs#940. Kmod labels are now deleted only if the kernel module does not have the appropriate tolerations for the taints on the node.
0b37a9a
to
916bd69
Compare
LGTM by me |
This change addresses #940.
Kmod labels are now deleted only if the kernel module does not have the appropriate tolerations for the taints on the node.
/cc @yevgeny-shnaidman @ybettan