-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added pod security context #177
Conversation
I have not been able to make the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jonasbg 👋
Sorry for the late(ish) reply.
Thank you for the PR, looks really nice 🙌
Two minor things:
- In the pr you are mixing
podSecurityContext
andpodsecurityContext
, i guess there is no reason to do so? Sticking to justpodSecurityContext
should fit in nicely to the other values that we have :) - If possible I'd say we make the values in the prod notes the default values. Should work for basically anybody and then users don't need to do anything to get the extra security benefit. That was my goal with issue Add Default securityContext Configuration #62
Regarding the other points:
- readOnlyRootFs for juice shop: yeah I guess this might be bit harder there are a handful of files written on juice shop startup, some unfortunately in folder which already contain other files. This makes a read only fs a bit tricky. I'd skip it for now. We might be able to change the juice-shop behavior a bit to make readOnlyRootFs easier
- net policies: very nice that you started looking into it. would be very cool to have a seperate pr for it 🚀 I started cleaning up the labels for the different pods multi-juicer consists of to make this easier but haven't started yet. any contributions are as highly welcome :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, slight change of plans :D
Will merge this now and (after slightly fixing the value names) release this in a feature release.
Will then use the production release not security context values as defaults in the next major / breaking release.
Urgh no another change of plans... 🥴 Before we only had I'm changing them to containerSecurityContext and podSecurityContext like it's done in the bitnami helm chart. |
What I've done:
Added
podSecurityContext
which is translated tospec.containers[].securityContext
as the regularsecurityContext
only applied tospec.securityContext
.Added SecurityContext to:
Updated
guides/production-notes/production-notes.md
with examples of best-practice for a security-context setup.Git history: I tried to add NetworkPolicy, which I did for juice-shop. But I think that is a bigger PR and that I should add it for all those other deployments as well. So I took it out, so that this PR is just about podSecurityContext.