@@ -487,7 +487,7 @@ func TestVolumeClient(client clientset.Interface, config VolumeTestConfig, fsGro
487
487
// Insert index.html with given content into given volume. It does so by
488
488
// starting and auxiliary pod which writes the file there.
489
489
// The volume must be writable.
490
- func InjectHtml (client clientset.Interface , config VolumeTestConfig , volume v1.VolumeSource , content string ) {
490
+ func InjectHtml (client clientset.Interface , config VolumeTestConfig , fsGroup * int64 , volume v1.VolumeSource , content string ) {
491
491
By (fmt .Sprint ("starting " , config .Prefix , " injector" ))
492
492
podClient := client .CoreV1 ().Pods (config .Namespace )
493
493
podName := fmt .Sprintf ("%s-injector-%s" , config .Prefix , rand .String (4 ))
@@ -523,6 +523,9 @@ func InjectHtml(client clientset.Interface, config VolumeTestConfig, volume v1.V
523
523
},
524
524
},
525
525
},
526
+ SecurityContext : & v1.PodSecurityContext {
527
+ FSGroup : fsGroup ,
528
+ },
526
529
RestartPolicy : v1 .RestartPolicyNever ,
527
530
Volumes : []v1.Volume {
528
531
{
@@ -537,8 +540,6 @@ func InjectHtml(client clientset.Interface, config VolumeTestConfig, volume v1.V
537
540
538
541
defer func () {
539
542
podClient .Delete (podName , nil )
540
- err := waitForPodNotFoundInNamespace (client , podName , injectPod .Namespace , PodDeleteTimeout )
541
- ExpectNoError (err )
542
543
}()
543
544
544
545
injectPod , err := podClient .Create (injectPod )
0 commit comments