Things that can only be in pod securityContext:
fsGroup, fsGroupChangePolicy
supplementalGroups
sysctls
Things that can only be in container securityContext:
allowPrivilegeEscalation
capabilities
privileged
procMount
readOnlyRootFilesystem
Everything else can be in either, but pod-level properties apply to all containers by default unless overridden by the container securityContext.
From what I saw every pod spec of every job already had
Things that can only be in pod securityContext: fsGroup, fsGroupChangePolicy supplementalGroups sysctls Things that can only be in container securityContext: allowPrivilegeEscalation capabilities
privileged
procMount readOnlyRootFilesystem Everything else can be in either, but pod-level properties apply to all containers by default unless overridden by the container securityContext.
From what I saw every pod spec of every job already had
so none of those need to be set again in containers, while OTOH other container-level security controls need to be applied.
This MR:
Overall this should make the different securityContexts more explicit and consistent and make Skaha more secure and portable.