Separate pod priority from preemption#62243
Separate pod priority from preemption#62243k8s-github-robot merged 2 commits intokubernetes:masterfrom
Conversation
What about we do not introduce a new featrue gate, but add a new argument to |
pkg/features/kube_features.go
Outdated
There was a problem hiding this comment.
Enabling preemption without enabling priority is wrong configuration. I think we should check and throw error if it happens. I don't know if we have any standard location in our codebase to check for such dependencies of feature gates.
There was a problem hiding this comment.
Thanks, I will make it a scheduler configuration.
I like this idea. We can then consider preemption enabled only when pod priority is enabled and preemption is not explicitly disabled. It prevents bad configurations where priority is disabled and preemption is enabled. |
Sorry, but ... why kube-controller-manager? shouldn't this be part of scheduler configure? |
kube-scheduler, I wrote it incorrectly. 😄 |
|
Thanks, Harry. Looks generally good, but could you please add a test for the case that preemption is disabled? |
|
@bsalamat Thanks for review, will do. |
|
/test pull-kubernetes-e2e-kops-aws |
There was a problem hiding this comment.
Please remove lines 337 to 343. We don't need node labels here.
There was a problem hiding this comment.
This causes the test to take a long time (30 seconds for each pod) before succeeding and has the potential of timing out when there are more pods in the test. Please use waitForPodUnschedulable to check that preemptor is marked unschedulable and then you can use waitForNominatedNodeName on the preemptor to ensure that its NominatedNodeName is never set. I'd suggest creating a variation of waitForNominatedNodeName that takes a timeout. Then you can use the new variation and wait only several seconds to ensure that the nominated node name is not set.
There was a problem hiding this comment.
Thanks for pointing out. Just fixed.
46adcb0 to
65491bf
Compare
test/integration/scheduler/util.go
Outdated
There was a problem hiding this comment.
s/create/creates/
Please remove "with given informer factory, custom name and pod informer" from the comment. They don't add any value to the comment and need to be updated when function args change.
|
/assign @timothysc for test approval |
|
/assign @mikedanese For component config approval |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bsalamat, mikedanese, resouer The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Automatic merge from submit-queue (batch tested with PRs 59592, 62308, 62523, 62635, 62243). If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
Users request to split priority and preemption feature gate so they can use priority separately.
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 #62068
Special notes for your reviewer:
I kept useENABLE_POD_PRIORITYas ENV name for gce cluster scripts for backward compatibility reason. Please let me know if other approach is preffered.This is a potential break change as existing clusters will be affected, we may need to include this in 1.11 maybe?TODO: update this doc https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
[Update] Usage: in config file for scheduler:
Release note: