Open consideRatio opened 1 month ago
Here's a draft of such a script. Notably, it compares the new supposedly unchanged 'escape' scheme with the new safe scheme, rather than comparing the actual current output of kubespawner.
It should be run in an existing hub pod via e.g.
cat compare_slugs.py | kubectl exec -it $(kubectl get pod -l component=hub -o name) -- python3 -
and installs kubespawner-dev in a venv.
In the hubs I administer, it produces no output (good) because the changed fields (pod_name
) are loaded from state. I'm not sure if it would have caught #3536 or not.
This script as is should test that legacy pvc name is found and detected and uses actual config.
An alternative is to write a script that runs outside the Hub against the users list api and takes as input a list of templates to check. This is a less thorough check, but might be better suited in some scenarios.
I think it can be useful for the upgrade guide to include a script to check username expansion differences. This could be useful in 2i2c deployments for example, so I figure I'll develop it anyhow.