Fix volume mount tests issue for windows

For windows node, security context is disabled. This PR fixes a bug so
that fsGroup will not be applied to pods that run on windows node.

Change-Id: Id9870416d2ad8ef791b3b4896d6747a2adbada2f
This commit is contained in:
Jing Xu 2019-06-03 10:12:27 -07:00
parent 1d2e8f318d
commit 8aacb8003f

View File

@ -546,10 +546,8 @@ func InjectHTML(client clientset.Interface, config TestConfig, fsGroup *int64, v
SecurityContext: GenerateSecurityContext(true), SecurityContext: GenerateSecurityContext(true),
}, },
}, },
SecurityContext: &v1.PodSecurityContext{ SecurityContext: GeneratePodSecurityContext(fsGroup, nil),
FSGroup: fsGroup, RestartPolicy: v1.RestartPolicyNever,
},
RestartPolicy: v1.RestartPolicyNever,
Volumes: []v1.Volume{ Volumes: []v1.Volume{
{ {
Name: volMountName, Name: volMountName,