always define fsGroup

This commit is contained in:
pat-s 2024-10-02 17:15:39 +02:00
parent 59ded1a8e7
commit ea366e9e89
No known key found for this signature in database
GPG key ID: 3C6318841EF78925

View file

@ -412,15 +412,15 @@ func podSecurityContext(sc *SecurityContext, secCtxConf SecurityContextConfig, s
nonRoot = sc.RunAsNonRoot
}
// if unset, set fsGroup to 1000 by default to support non-root images
if sc.FSGroup == nil {
fsGroup = newInt64(defaultFSGroup)
}
seccomp = seccompProfile(sc.SeccompProfile)
apparmor = apparmorProfile(sc.ApparmorProfile)
}
// if unset, set fsGroup to 1000 by default to support non-root images
if sc.FSGroup == nil {
fsGroup = newInt64(defaultFSGroup)
}
if nonRoot == nil && user == nil && group == nil && fsGroup == nil && seccomp == nil {
return nil
}