Init container for jupyterhub html templates

I am trying to get Binderhub/Jupyterhub deployed on a Kubernetes environment with GKE. I am struggling with the customization html templates for Jupyterhub. I was successful in getting the Binderhub customization templates set up with an init container that was baked with the templates and the templates were then copied to a volume that the Binderhub pod mounted to use the templates. I would like to use the same system to mount the Jupyterhub templates to the Jupyterhub pod. Since I am using helm and Jupyterhub is a subchart of Binderhub in helm I am having trouble finding what overrides to use to create an init container that will be attached to the Jupyterhub pod so it can mount the templates on a volume like we have done for Binderhub.

As a last resort we have rebuilt the Jupyterhub container image overwriting the templates (the page.html template to start) to see if that would show the changes since the traditional init container and mounted volume was not working and overwriting the template seems to have no effect.

^ Basically, we got the Binderhub home page themed, but we are having trouble figuring out how to theme the Jupyter notebook pages themselves. We know it’s possible because we’ve seen it done with plain Jupyterhub. Just can’t figure out how to do it through Binderhub.

The templates used by the notebook server are located in each of the images that get built from the repositories.

So you need to put something extra into each container that gets built.

I’d investigate if you can set a value in (which corresponds to the jupyter_notebook_config.json file you can use locally) to tell the notebook server from which path to load the templates. Then configure the pods so that they mount an extra volume at that path.

I have gone to trying to alter the templates in the base container image that is used by Jupyterhub to build the resulting notebook container but that seems to not work. I have been building off of the image jupyterhub/k8s-singleuser-sample and overwriting the templates in the directory /srv/conda/lib/python3.5/site-packages/notebook/templates and then setting the following helm override


which the change did deploy but looks like if i deploy a new notebook it builds the container off of the old (or a different image set somewhere else) but I’m having a hard time seeing where why that is not building off that new custom image that should set the templates for the jupyter notebook.

It looks like the problem really is that Jupyterhub is not using the new custom image as the base image to create notebook containers from.

I want to add customized template file on the kubernetes cluster where i have installed jupyterhub with the instruction Installing JupyterHub — Zero to JupyterHub with Kubernetes documentation
Not able to find how and where i need to place the file to reflect the effect in jupyterhub