Fix apparmorProfile being ignored when it's the only field (#4507)

This commit is contained in:
tsufeki 2024-12-03 16:29:03 +01:00 committed by GitHub
parent 41f1d3aa36
commit db45794091
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -437,7 +437,7 @@ func podSecurityContext(sc *SecurityContext, secCtxConf SecurityContextConfig, s
apparmor = apparmorProfile(sc.ApparmorProfile)
}
if nonRoot == nil && user == nil && group == nil && fsGroup == nil && seccomp == nil {
if nonRoot == nil && user == nil && group == nil && fsGroup == nil && seccomp == nil && apparmor == nil {
return nil
}