-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Added unschedulabe predicate. #60386
Conversation
Signed-off-by: Da K. Ma <madaxa@cn.ibm.com>
/cc @janetkuo |
// PodToleratesNodeTaints checks if a pod tolerations can tolerate the node taints | ||
func PodToleratesNodeTaints(pod *v1.Pod, meta algorithm.PredicateMetadata, nodeInfo *schedulercache.NodeInfo) (bool, []algorithm.PredicateFailureReason, error) { | ||
// CheckNodeUnschedulablePredicate checks if a pod can be scheduled on a node with Unschedulable spec. | ||
func CheckNodeUnschedulablePredicate(pod *v1.Pod, meta algorithm.PredicateMetadata, nodeInfo *schedulercache.NodeInfo) (bool, []algorithm.PredicateFailureReason, error) { |
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.
nit: Shouldn't the function be CheckNodeSchedulable instead as we return true if it is schedulable? Also, do you want to add a e2e test?
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.
prefer to current name, as Unschedulable
is a spec of node; and add e2e case when TaintNodesByCondition to beta :)
Would you add a test to catch this regression in DaemonSet controller? |
If this needs to be fixed in 1.10, can someone in the SIG add the status/approved-for-milestone label? Thanks. |
sure :) |
Signed-off-by: Da K. Ma <madaxa@cn.ibm.com>
Added UT case to catch |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: janetkuo, k82cn 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 |
/test all [submit-queue is verifying that this PR is safe to merge] |
/retest |
/retest Review the full test history for this PR. Silence the bot with an |
Automatic merge from submit-queue (batch tested with PRs 60683, 60386). If you want to cherry-pick this change to another branch, please follow the instructions here. |
Signed-off-by: Da K. Ma madaxa@cn.ibm.com
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #60163
Release note: