Hi,
I was wondering how I can set singleuser container_security_context from within values.yaml file in z2jh? in other words, what is the equivalent of spawner.container_security_context = {"capabilities": {"drop": ["ALL"]}} there?
container_security_context
values.yaml
spawner.container_security_context = {"capabilities": {"drop": ["ALL"]}}
I couldn’t find something like:
singleuser: containerSecurityContext:
in the source code.
best
I think you best option is to use one of the config overrides:
hub: config: KubeSpawner: extra_container_config:
https://jupyterhub-kubespawner.readthedocs.io/en/latest/spawner.html#kubespawner.KubeSpawner.extra_container_config
But doesn’t c.KubeSpawner.extra_container_config = Dict() apply to singleuser pods? what if I want to apply this to single users pod?
c.KubeSpawner.extra_container_config = Dict()
If you only want to change it for a single user you’ll need to define a custom Python hook, e.g. write a pre_spawn_hook to modify the spawner properties https://jupyterhub-kubespawner.readthedocs.io/en/stable/spawner.html#kubespawner.KubeSpawner.pre_spawn_hook
pre_spawn_hook