Skip to content

Commit 10a7da8

Browse files
arun717cursoragent
andcommitted
test(e2e): satisfy restricted PSS for Vault Helm installer pod
The vault-installer pod was rejected on OCP namespaces enforcing restricted Pod Security. Set the required pod and container security context instead of relying on privileged mode. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b77bc99 commit 10a7da8

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/e2e/utils_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,6 +2211,12 @@ func setupVaultServer(ctx context.Context, cfg *rest.Config, loader library.Dyna
22112211
Spec: corev1.PodSpec{
22122212
ServiceAccountName: serviceAccountName,
22132213
RestartPolicy: corev1.RestartPolicyNever,
2214+
SecurityContext: &corev1.PodSecurityContext{
2215+
RunAsNonRoot: &runAsNonRoot,
2216+
SeccompProfile: &corev1.SeccompProfile{
2217+
Type: corev1.SeccompProfileTypeRuntimeDefault,
2218+
},
2219+
},
22142220
Containers: []corev1.Container{
22152221
{
22162222
Name: "helm",
@@ -2231,6 +2237,9 @@ func setupVaultServer(ctx context.Context, cfg *rest.Config, loader library.Dyna
22312237
Capabilities: &corev1.Capabilities{
22322238
Drop: []corev1.Capability{"ALL"},
22332239
},
2240+
SeccompProfile: &corev1.SeccompProfile{
2241+
Type: corev1.SeccompProfileTypeRuntimeDefault,
2242+
},
22342243
},
22352244
},
22362245
},

0 commit comments

Comments
 (0)