-
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
Add test cases for taintbasedevictions #69788
Add test cases for taintbasedevictions #69788
Conversation
/sig scheduling |
/kind feature |
Thanks, I'm going to take time to review this :) /assign |
// TestEvictPodsByTaints, ensures we just have a NoExecute taint applied to node. | ||
// NodeController is just responsible for enqueuing the node to tainting queue from which taint manager picks up | ||
// and evicts the pods on the node. | ||
func TestEvictPodsByTaints(t *testing.T) { |
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.
change func name to "TestApplyNoExecuteTaints"?
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 add more cases to cover the scenario that by giving nodes having NoExecute taints, once we got a Ready=true condition, those NoExecute taints are expected to take off those nodes?
Otherwise lgtm. Thanks @ravisantoshgudimetla !
b4d8bc9
to
42b2fee
Compare
/retest |
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, but I would like someone more familiar with the logic to take a look.
// NotReady Taint with NoExecute effect should be applied to this node. | ||
{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: "node3", |
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.
where is node2
...
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.
node3 preempted node2, lol, I missed it. I will change it.
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
42b2fee
to
d281d56
Compare
/lgtm |
/milestone v1.13 (also, thanks for adding unit test coverage!) |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: k82cn, ravisantoshgudimetla 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 |
@ravisantoshgudimetla I think #54297 can be resolved by this PR? |
ping @ravisantoshgudimetla ^^ |
What this PR does / why we need it:
Add unit tests for basic taint based evictions.
/cc @Huang-Wei @k82cn @bsalamat
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 #
Special notes for your reviewer:
Release note: