move feature gate checks inside IsCriticalPod#66082
move feature gate checks inside IsCriticalPod#66082k8s-github-robot merged 1 commit intokubernetes:masterfrom
Conversation
|
@sjenning: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/release-note-none |
59e0be5 to
3969d2f
Compare
There was a problem hiding this comment.
curious how was it working before?
There was a problem hiding this comment.
took me a second to figure it out. the IsCriticalPod() in sortPodsByQOS() was unprotected by the feature gate.
3969d2f to
f2a7654
Compare
|
/lgtm |
|
/retest |
| // to make admission and scheduling decisions. | ||
| func IsCriticalPod(pod *v1.Pod) bool { | ||
| return IsCritical(pod.Namespace, pod.Annotations) || (pod.Spec.Priority != nil && IsCriticalPodBasedOnPriority(*pod.Spec.Priority)) | ||
| if utilfeature.DefaultFeatureGate.Enabled(features.PodPriority) { |
There was a problem hiding this comment.
We did not check priority feature gate before :) @dashpole , any background to share?
There was a problem hiding this comment.
Looks like that was an oversight when we added IsCriticalPodBasedOnPriority. We should add it here.
|
/assign @derekwaynecarr @mikedanese |
|
/test pull-kubernetes-integration |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aveshagarwal, derekwaynecarr, sjenning 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 |
|
/test all [submit-queue is verifying that this PR is safe to merge] |
|
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
Currently
IsCriticalPod()calls throughout the code are protected byutilfeature.DefaultFeatureGate.Enabled(features.ExperimentalCriticalPodAnnotation).However, with Pod Priority, this gate could be disabled which skips the priority check inside IsCriticalPod().
This PR moves the feature gate checking inside
IsCriticalPod()and handles both situations properly.@aveshagarwal @ravisantoshgudimetla @derekwaynecarr
/sig node
/sig scheduling
/king bug