From 8aacb8003f54cad26e7c9c30418203bad114b5f3 Mon Sep 17 00:00:00 2001 From: Jing Xu Date: Mon, 3 Jun 2019 10:12:27 -0700 Subject: [PATCH] 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 --- test/e2e/framework/volume/fixtures.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/e2e/framework/volume/fixtures.go b/test/e2e/framework/volume/fixtures.go index fb3c4eec103..ff9b87a69f5 100644 --- a/test/e2e/framework/volume/fixtures.go +++ b/test/e2e/framework/volume/fixtures.go @@ -546,10 +546,8 @@ func InjectHTML(client clientset.Interface, config TestConfig, fsGroup *int64, v SecurityContext: GenerateSecurityContext(true), }, }, - SecurityContext: &v1.PodSecurityContext{ - FSGroup: fsGroup, - }, - RestartPolicy: v1.RestartPolicyNever, + SecurityContext: GeneratePodSecurityContext(fsGroup, nil), + RestartPolicy: v1.RestartPolicyNever, Volumes: []v1.Volume{ { Name: volMountName,