Description
Bug description
Reported in https://discourse.jupyter.org/t/jupyterhub-helm-chart-4-0-0/29887/2
How to reproduce
- Deploy Z2JH 3.3.8 with persistent user storage
- Start and stop a named server
- Upgrade Z2JH to 4.0.0
- Start the named server, a new PVC is created
Expected behaviour
Z2JH should use the existing named PVC
Actual behaviour
3.3.8 set pvcNameTemplate: claim-{username}{servername}
, overriding the KubeSpawner 6.2.0 default of claim-{username}--{servername}
https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/3.3.8/jupyterhub/values.yaml#L395
https://github.com/jupyterhub/kubespawner/blob/6.2.0/kubespawner/spawner.py#L569
4.0.0 uses the default from KubeSpawner
https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/4.0.0/jupyterhub/values.yaml#L416
As a result the automatic legacy PVC detection in KubeSpawner fails, since it assumes the 6.2.0 template is used
https://github.com/jupyterhub/kubespawner/blob/a8f28439078e42e8012de8f141b51bd6fa96d9c7/kubespawner/spawner.py#L3118
[D 2024-11-15 14:05:10.037 JupyterHub spawner:3117] Checking for legacy-named pvc claim-test-40example-2eorg--named for [email protected]
Instead of claim-test-40example-2eorgnamed