mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-07 11:04:44 +00:00
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. move feature gate checks inside IsCriticalPod Currently `IsCriticalPod()` calls throughout the code are protected by `utilfeature.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