Fix CreateSecPodWithNodeName to properly set node to be deployed

This commit is contained in:
Masaki Kimura 2018-11-14 16:10:14 +00:00
parent 3bcbc5da79
commit 6a94656d0e
2 changed files with 4 additions and 3 deletions

View File

@ -880,12 +880,13 @@ func CreateSecPod(client clientset.Interface, namespace string, pvclaims []*v1.P
// create security pod with given claims
func CreateSecPodWithNodeName(client clientset.Interface, namespace string, pvclaims []*v1.PersistentVolumeClaim, isPrivileged bool, command string, hostIPC bool, hostPID bool, seLinuxLabel *v1.SELinuxOptions, fsGroup *int64, nodeName string, timeout time.Duration) (*v1.Pod, error) {
pod := MakeSecPod(namespace, pvclaims, isPrivileged, command, hostIPC, hostPID, seLinuxLabel, fsGroup)
// Setting nodeName
pod.Spec.NodeName = nodeName
pod, err := client.CoreV1().Pods(namespace).Create(pod)
if err != nil {
return nil, fmt.Errorf("pod Create API error: %v", err)
}
// Setting nodeName
pod.Spec.NodeName = nodeName
// Waiting for pod to be running
err = WaitTimeoutForPodRunningInNamespace(client, pod.Name, namespace, timeout)

View File

@ -342,7 +342,7 @@ func testVolumeModeSuccessForDynamicPV(input *volumeModeTestInput) {
var err error
// TODO: This skip should be removed once #70760 is fixed
skipTestUntilBugfix("70760", input.driverName, []string{"csi-hostpath", "com.google.csi.gcepd"})
skipTestUntilBugfix("70760", input.driverName, []string{"com.google.csi.gcepd"})
By("Creating sc")
input.sc, err = cs.StorageV1().StorageClasses().Create(input.sc)