@@ -21,7 +21,6 @@ import (
21
21
"reflect"
22
22
23
23
"k8s.io/klog/v2"
24
- "k8s.io/kubernetes/pkg/scheduler/profile"
25
24
26
25
v1 "k8s.io/api/core/v1"
27
26
storagev1 "k8s.io/api/storage/v1"
@@ -32,6 +31,7 @@ import (
32
31
"k8s.io/client-go/tools/cache"
33
32
"k8s.io/kubernetes/pkg/features"
34
33
"k8s.io/kubernetes/pkg/scheduler/internal/queue"
34
+ "k8s.io/kubernetes/pkg/scheduler/profile"
35
35
)
36
36
37
37
func (sched * Scheduler ) onPvAdd (obj interface {}) {
@@ -306,8 +306,8 @@ func responsibleForPod(pod *v1.Pod, profiles profile.Map) bool {
306
306
// skipPodUpdate checks whether the specified pod update should be ignored.
307
307
// This function will return true if
308
308
// - The pod has already been assumed, AND
309
- // - The pod has only its ResourceVersion, Spec.NodeName, Annotations, ManagedFields and/or Finalizers
310
- // updated.
309
+ // - The pod has only its ResourceVersion, Spec.NodeName, Annotations,
310
+ // ManagedFields, Finalizers and/or Conditions updated.
311
311
func (sched * Scheduler ) skipPodUpdate (pod * v1.Pod ) bool {
312
312
// Non-assumed pods should never be skipped.
313
313
isAssumed , err := sched .SchedulerCache .IsAssumedPod (pod )
@@ -343,8 +343,10 @@ func (sched *Scheduler) skipPodUpdate(pod *v1.Pod) bool {
343
343
// Same as above, when annotations are modified with ServerSideApply,
344
344
// ManagedFields may also change and must be excluded
345
345
p .ManagedFields = nil
346
- // Finalizers must be excluded because scheduled result can not be affected
346
+ // The following might be changed by external controllers, but they don't
347
+ // affect scheduling decisions.
347
348
p .Finalizers = nil
349
+ p .Status .Conditions = nil
348
350
return p
349
351
}
350
352
assumedPodCopy , podCopy := f (assumedPod ), f (pod )
0 commit comments