Remove Limits from scheduling e2e balanced pod resources

The purpose of the pod created by `createBalancedPodForNodes()` is to ensure
that all nodes have equal resource requests (as seen by the scheduler). This
prevents the default scheduling behavior (which attempts to balance resource requests)
from interfering with e2e's which test other priorities/score plugins.

Because the scheduler only worries about requests, specifying `Limits` in this pod
is unnecessary. In fact, if the calculated "balancing" limit is too low, it can cause
the balancing pod to never start due to OOMKill errors, leading to flakes and failures.
This commit is contained in:
Mike Dame 2021-04-21 15:58:00 -04:00
parent 1e4388964e
commit 07029c941a

View File

@ -550,7 +550,6 @@ func createBalancedPodForNodes(f *framework.Framework, cs clientset.Interface, n
Name: "", Name: "",
Labels: balancePodLabel, Labels: balancePodLabel,
Resources: &v1.ResourceRequirements{ Resources: &v1.ResourceRequirements{
Limits: needCreateResource,
Requests: needCreateResource, Requests: needCreateResource,
}, },
Affinity: &v1.Affinity{ Affinity: &v1.Affinity{