-
Notifications
You must be signed in to change notification settings - Fork 16
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
Non-schedulable nodes should not be part of targeted nodes for Module… #83
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yevgeny-shnaidman 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 |
/assign @ybettan |
…rh-ecosystem-edge#125) Currently ModuleLoader cannot be scheduled to run on Non-Schedulable nodes, i.e. masters etc'. This PR fixed the extraction of schedulable nodes list, which will also affect the status update of the Module
f81d24a
to
c13ee41
Compare
Upstream PR for cherry-pick: |
logger.Error(err, "Could not list nodes") | ||
return nil, fmt.Errorf("could not list nodes: %v", err) | ||
} | ||
return nodes.Items, nil | ||
nodes := make([]v1.Node, 0, len(selectedNodes.Items)) |
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.
I would prefer to call it scheduableNodes
but let's stay consistent with the u/s code.
@@ -397,3 +404,12 @@ func (r *ModuleReconciler) SetupWithManager(mgr ctrl.Manager, kernelLabel string | |||
Named("module"). | |||
Complete(r) | |||
} | |||
|
|||
func isNodeSchedulable(node *v1.Node) bool { | |||
for _, taint := range node.Spec.Taints { |
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.
Who is responsible for tainting the node?
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.
master nodes , that are not schedulable ( not SNO) are tainted by KubeAPI server
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.
Ack. So this has nothing to do with our code.
/lgtm |
… (#125)
Currently ModuleLoader cannot be scheduled to run on Non-Schedulable nodes, i.e. masters etc'. This PR fixed the extraction of schedulable nodes list, which will also affect the status update of the Module