jupyterhub / zero-to-jupyterhub-k8s

Helm Chart & Documentation for deploying JupyterHub on Kubernetes
https://zero-to-jupyterhub.readthedocs.io
Other
1.52k stars 791 forks source link

Support for sidecars in single user pod #645

Closed lambertjosh closed 4 years ago

lambertjosh commented 6 years ago

You can add sidecars to the Hub pod, which is great, but it would also be very helpful to allow sidecars in the single user pods as well.

For example if you need to run Cloud SQL Proxy to attach to a database, this would make it a lot easier than maintaining a custom docker image.

yuvipanda commented 6 years ago

I think you can do that with c.KubeSpawner.singleuser_extra_containers or something like that, in extraConfig. We should probably expose that as a config here directly, so you don't have to use extraConfig.

metonymic-smokey commented 4 years ago

@yuvipanda is this issue still up for grabs?

Thanks!

consideRatio commented 4 years ago

Configuring c.KubeSpawner.extra_containers is the way to go in order to provide a sidecar container to the user pods, or using a kubernetes mutating web hook that updates all pods created to have another container for example.

NOTE: singleuser_ prefix of kubespawner configuration is deprecated, so it should be c.KubeSpawner.extra_containers and not c.KubeSpawner.singleuser_extra_containers.