mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Skip scheduling the pod if it has been assumed and the pod updates could be skipped.
This commit is contained in:
@@ -309,6 +309,12 @@ func TestScheduler(t *testing.T) {
|
||||
AssumeFunc: func(pod *v1.Pod) {
|
||||
gotAssumedPod = pod
|
||||
},
|
||||
IsAssumedPodFunc: func(pod *v1.Pod) bool {
|
||||
if pod == nil || gotAssumedPod == nil {
|
||||
return false
|
||||
}
|
||||
return pod.UID == gotAssumedPod.UID
|
||||
},
|
||||
}
|
||||
|
||||
s := &Scheduler{
|
||||
|
||||
Reference in New Issue
Block a user