Add securityContext to skupper-router deployment
Fixes #2326
One point to discuss here. Would it be better if we add a new env var + flag to the Controller, so that we can define whether or not to use SCC / PSA at runtime, instead of using a static logic?
@nluaces @c-kruse @hash-d Do you guys see any issue with keeping just the following entries:
top level securityContext (seccompProfile left out)
- deployment.spec.template.spec.securityContext.runAsNonRoot (true)
all containers
- deployment.spec.template.spec.containers[*].securityContext.allowPrivilegeEscalation (false)
- deployment.spec.template.spec.containers[*].securityContext.capabilities (drop all)
- deployment.spec.template.spec.containers[*].securityContext.runAsNonRoot (true)
all initContainers
- deployment.spec.template.spec.initContainers[*].securityContext.allowPrivilegeEscalation (false)
- deployment.spec.template.spec.initContainers[*].securityContext.capabilities (drop all)
- deployment.spec.template.spec.initContainers[*].securityContext.runAsNonRoot (true)
I believe that even these agreed upon fields, could be added by default as part of the upcoming 2.2 release, but we could introduce a flag/env-var to disable this behavior, if someone needs that for any reason.
If you guys agree, I will make these changes and request a new round of review.
Thank you.
@fgiorgetti that approach sounds good to me!