Skip to content
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

Make Pod-level security context configurable in Helm chart #3632

Open
wtripp180901 opened this issue Mar 5, 2025 · 2 comments
Open

Make Pod-level security context configurable in Helm chart #3632

wtripp180901 opened this issue Mar 5, 2025 · 2 comments

Comments

@wtripp180901
Copy link

Proposed change

Security contexts can generally be set at the container level but not at the pod level. It would be nice to have this be configurable in the Helm chart

Alternative options

I've been using Helm post-renderers to work around this

Who would use this feature?

I'm trying to run Jupyter in a restricted namespace and some of the controls require securityContexts to explicitly set values at the pod level. I don't believe there is anything in zero-to-jupyterhub which actually needs to violate any of the restricted controls, so having these be configurable would allow Jupyter to run in restricted namespaces and provide more security guarantees

@consideRatio
Copy link
Member

There are many pods associated with a few different kinds of workloads - for what workload are you looking to configure the Pods' securityContext?

Example workloads:

  • hub
  • proxy
  • jupyter-username (user server pods)

@wtripp180901
Copy link
Author

wtripp180901 commented Mar 5, 2025

hub, proxy and user-placeholder were the workloads which were being denied in restricted mode and didn't have their security contexts exposed, but the only additional config they needed was

spec:
  template:
    spec:
      securityContext:
        runAsNonRoot: true
        seccompProfile:
          type: RuntimeDefault

which they still seem to work with. Overriding singleuser.profileList[*].pod_security_context was sufficient to get the named server pods working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants