diff --git a/test/e2e/scheduling/predicates.go b/test/e2e/scheduling/predicates.go index 954e9e1666c..8689f71ff61 100644 --- a/test/e2e/scheduling/predicates.go +++ b/test/e2e/scheduling/predicates.go @@ -836,11 +836,15 @@ func initPausePod(f *framework.Framework, conf pausePodConfig) *v1.Pod { }, }, Tolerations: conf.Tolerations, - NodeName: conf.NodeName, PriorityClassName: conf.PriorityClassName, TerminationGracePeriodSeconds: &gracePeriod, }, } + // TODO: setting the Pod's nodeAffinity instead of setting .spec.nodeName works around the + // Preemption e2e flake (#88441), but we should investigate deeper to get to the bottom of it. + if len(conf.NodeName) != 0 { + e2epod.SetNodeAffinity(&pod.Spec, conf.NodeName) + } if conf.Resources != nil { pod.Spec.Containers[0].Resources = *conf.Resources }