Don't set NodeName directly in Pods so that it still goes through the scheduler

Change-Id: I244b6aac0289a13339f3ac228c4ad9ecf8c07b42
This commit is contained in:
Michelle Au
2020-02-11 19:17:41 -08:00
parent 7faee2c30a
commit fb9f02b5e1
9 changed files with 40 additions and 21 deletions

View File

@@ -215,7 +215,7 @@ func (t *volumeModeTestSuite) DefineTests(driver TestDriver, pattern testpattern
ginkgo.By("Creating pod")
pod := e2epod.MakeSecPod(l.ns.Name, []*v1.PersistentVolumeClaim{l.Pvc}, nil, false, "", false, false, e2epv.SELinuxLabel, nil)
// Setting node
pod.Spec.NodeName = l.config.ClientNodeName
e2epod.SetNodeSelection(pod, e2epod.NodeSelection{Name: l.config.ClientNodeName})
pod, err = l.cs.CoreV1().Pods(l.ns.Name).Create(context.TODO(), pod, metav1.CreateOptions{})
framework.ExpectNoError(err, "Failed to create pod")
defer func() {