Add securityContext to skupper-router deployment#2327
Add securityContext to skupper-router deployment#2327fgiorgetti merged 3 commits intoskupperproject:mainfrom
Conversation
|
One point to discuss here. |
c-kruse
left a comment
There was a problem hiding this comment.
I think that the SecurityContexts set up on the containers are pretty unobjectionable. I suppose we could gate them, but I can't think of a situation where any of these settings would not be desirable.
| } | ||
| } | ||
|
|
||
| // addPodSecurityContext Only added if server version is >=1.24 |
There was a problem hiding this comment.
I am curious where we came up with this version: Looking back in api docs history I didn't see much evidence that this wouldn't work prior to 1.24 - near as I can tell it would work as far back as 1.19 (when seccomp went GA.)
There was a problem hiding this comment.
I noticed that as well. I left is as is, because that is the version defined in V1.
Anyway, I believe we will end up removing the seccompProfile element from the PR,
so this whole function can go away.
| securityContext: | ||
| runAsNonRoot: true | ||
| seccompProfile: | ||
| type: RuntimeDefault |
There was a problem hiding this comment.
I suspect seccompProfile type "RuntimeDefault" is going to be suitable for most use cases, but hard coding it would likely end up being a deal breaker in some environments. We definitely need a way to either omit a seccompProfile (and defer the setting to an external controller or mutating admissions webhook) or a way to configure this (enviornment variable/flag/site setting.)
There was a problem hiding this comment.
I agree with you. The seccompProfile should be left out of this.
|
@nluaces @c-kruse @hash-d Do you guys see any issue with keeping just the following entries: top level securityContext (seccompProfile left out)
all containers
all initContainers
I believe that even these agreed upon fields, could be added by default as part of the upcoming 2.2 release, 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! |
e5c2793 to
0bba6f6
Compare
c1a04fd to
082d812
Compare
Fixes #2326