Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop and test script to list usernames that will get escaped differently with KubeSpawner 7's safe slug scheme #3532

Open
consideRatio opened this issue Oct 2, 2024 · 2 comments

Comments

@consideRatio
Copy link
Member

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.

@minrk
Copy link
Member

minrk commented Oct 4, 2024

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.

@minrk
Copy link
Member

minrk commented Oct 5, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants