Skip to content

Commit 5b24a65

Browse files
authored
Fix security context for PSS restricted policy being overridden when runAsUser specified (#20)
1 parent 28153ff commit 5b24a65

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

webhooks/mutatepod_parts.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,9 @@ func gcloudSetupContainer(
6565
},
6666
},
6767
}
68+
6869
if runAsUser != nil {
69-
securityContext = &corev1.SecurityContext{
70-
RunAsUser: runAsUser,
71-
}
70+
securityContext.RunAsUser = runAsUser
7271
}
7372

7473
c := corev1.Container{

0 commit comments

Comments
 (0)