-
Notifications
You must be signed in to change notification settings - Fork 39.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
Task 3: Add MemoryPressure toleration for no BestEffort pod. #50180
Conversation
/cc @gmarek |
@@ -162,6 +166,23 @@ func (p *podTolerationsPlugin) Admit(a admission.Attributes) error { | |||
} | |||
} | |||
|
|||
if utilfeature.DefaultFeatureGate.Enabled(features.TaintNodesByCondition) { |
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.
Similarly as in other PR - I think it's fine to add those tolerations even if feature is not enabled. We do this for NotReady 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.
done.
@@ -148,6 +224,10 @@ func TestPodAdmission(t *testing.T) { | |||
informerFactory.Core().InternalVersion().Namespaces().Informer().GetStore().Update(namespace) | |||
|
|||
handler.pluginConfig = &pluginapi.Configuration{Default: test.defaultClusterTolerations, Whitelist: test.clusterWhitelist} | |||
pod := test.pod |
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.
Add this explicitly to all test cases.
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.
done.
/lgtm |
@derekwaynecarr , can you approve that ? |
@@ -162,6 +164,21 @@ func (p *podTolerationsPlugin) Admit(a admission.Attributes) error { | |||
} | |||
} | |||
|
|||
if qoshelper.GetPodQOS(pod) != api.PodQOSBestEffort { |
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.
we need to ensure that this admission controller is run after all resource defaulting controllers.
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.
+1.
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.
hm... , do you means this admission controller need to be the latest one in apiserver's args?
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.
its a doc issue. you basically will want this controller to be the one that appears right before ResourceQuota
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 think the disk pressure toleration is more naunced.
i am fine with the memory pressure toleration.
Effect: api.TaintEffectNoSchedule, | ||
}, | ||
{ | ||
Key: algorithm.TaintNodeDiskPressure, |
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.
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.
@derekwaynecarr , thanks very much for your input. I also found this when handling taint for scheduler: the scheduler will filter out disk pressure nodes, but check QoS for memory pressure. Will remove DiskPressure toleration in this PR.
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.
Removed 'DiskPressure' toleration.
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.
@vishh , @derekwaynecarr , is latest PR OK for you?
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.
The current behavior for DiskPressure where no pods will be allowed on a node should continue to exist. So +1 on the decision of not tolerating DiskPressure for any pods.
@@ -162,6 +164,21 @@ func (p *podTolerationsPlugin) Admit(a admission.Attributes) error { | |||
} | |||
} | |||
|
|||
if qoshelper.GetPodQOS(pod) != api.PodQOSBestEffort { |
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.
+1.
/retest |
1 similar comment
/retest |
it looks good to me on my side, but @derekwaynecarr had good comment about order of admission controllers (which I don't know anything about). |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: derekwaynecarr, gmarek, k82cn Associated issue: 42001 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all Tests are more than 96 hours old. Re-running tests. |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue |
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): part of #42001Release note: