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

Kubernetes Per User Resource does not support "." in user names. #852

Open
yhal-nesi opened this issue Aug 15, 2024 · 2 comments
Open

Kubernetes Per User Resource does not support "." in user names. #852

yhal-nesi opened this issue Aug 15, 2024 · 2 comments

Comments

@yhal-nesi
Copy link

Dot is a perfectly legal and common character in posix username, but it is used to generate a kubernetes namespace name and kubernetes doesn't allow dots.

Looks like there is one place where it needs to be adjusted?
https://github.com/OSC/ood_core/blob/master/lib/ood_core/job/adapters/kubernetes/batch.rb#L274

as well as the bootstrap script https://github.com/OSC/ondemand/blob/master/hooks/k8s-bootstrap/k8s-bootstrap-ondemand.sh

@johrstrom
Copy link
Contributor

hi thanks for the bug report. Seems like we need to sanitize to -?

@yhal-nesi
Copy link
Author

An example of how JupyterHub deals with K8 name generation: https://github.com/jupyterhub/kubespawner/blob/main/kubespawner/slugs.py
And this is the kind of names that get generated:
https://github.com/jupyterhub/kubespawner/blob/main/tests/test_slugs.py#L6

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