Where/when is pre_spawn_hook called? z2jh

Hi,

I couldn’t find the function pre_spawn_hook in the source code of Kubespawner kubespawner/kubespawner/spawner.py at a4b9b190f0335406c33c6de11b5d1b687842dd89 · jupyterhub/kubespawner · GitHub. I’m wondering when/where is this function called.
I assume that in z2jh the values.yaml will be converted to config.py and called jupyterhub -f config.py within the hub pod. Is that right? but when/where are pre_spawn_hood or other functions defined in the above Kubespawner repo like options_form called? I would like to know the order of functions called at the initialization of jupyterhub.

best

As name suggests. pre_spawn_hook is called just before spawning. Here is the relevant code. As you can see, after calling pre_spawn_hook, internal TLS certs (if configured) are created and spawner.start() is called to start spawner (in your case KubeSpawner).

1 Like