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

Added unschedulabe predicate. #60386

Merged
merged 2 commits into from
Mar 2, 2018
Merged

Conversation

k82cn
Copy link
Member

@k82cn k82cn commented Feb 25, 2018

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:

None

Signed-off-by: Da K. Ma <madaxa@cn.ibm.com>
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 25, 2018
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 25, 2018
@k82cn
Copy link
Member Author

k82cn commented Feb 25, 2018

/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) {
Copy link
Contributor

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?

Copy link
Member Author

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 :)

@janetkuo janetkuo self-assigned this Feb 27, 2018
@janetkuo
Copy link
Member

Would you add a test to catch this regression in DaemonSet controller?

@jberkus
Copy link

jberkus commented Feb 27, 2018

If this needs to be fixed in 1.10, can someone in the SIG add the status/approved-for-milestone label? Thanks.

@k82cn
Copy link
Member Author

k82cn commented Feb 27, 2018

Would you add a test to catch this regression in DaemonSet controller?

sure :)

@kow3ns kow3ns added this to Backlog in Workloads via automation Feb 27, 2018
@kow3ns kow3ns moved this from Backlog to In Progress in Workloads Feb 27, 2018
Signed-off-by: Da K. Ma <madaxa@cn.ibm.com>
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 28, 2018
@k82cn
Copy link
Member Author

k82cn commented Feb 28, 2018

Added UT case to catch UnScheduable, PTAL :)

@janetkuo
Copy link
Member

janetkuo commented Mar 2, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 2, 2018
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k82cn
Copy link
Member Author

k82cn commented Mar 2, 2018

/retest

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@k8s-github-robot
Copy link

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.

@k8s-github-robot k8s-github-robot merged commit ae1fc13 into kubernetes:master Mar 2, 2018
Workloads automation moved this from In Progress to Done Mar 2, 2018
@k82cn k82cn deleted the k8s_60163 branch March 2, 2018 12:11
@k82cn k82cn mentioned this pull request Apr 19, 2018
15 tasks
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Workloads
  
Done
Development

Successfully merging this pull request may close these issues.

DaemonSet should ignore the unschedulable field of a node
7 participants