Merge pull request #71039 from mkimuram/issue/70760hostpath

Fix CreateSecPodWithNodeName to properly set node to be deployed
pull/58/head
k8s-ci-robot 2018-11-14 23:19:57 -08:00 committed by GitHub
commit 5b76030760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)