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

Can't create Jupyter pods due to length of username #179

Open
durandom opened this issue Aug 28, 2023 · 8 comments
Open

Can't create Jupyter pods due to length of username #179

durandom opened this issue Aug 28, 2023 · 8 comments

Comments

@durandom
Copy link
Member

Usernames can be longer than 42 characters, e.g. mapping username from Active Directory or mapping the email address.
In this case the constructed name for the pod in the Jupyter stateful set exceeds the 63 character limit of kubernetes for labels.

statefulset-controller create Pod jupyter-nb-Luhwvfk2nyoLopbjs71aw-2dsxSenuawajyrftbyhktba-0 in StatefulSetjupyter-nb-luhwvfk2nyolopbjs71aw-2dsxSenuawaiyrftbyhktba failed error: Pod "jupyte
r-nb-luhwvfk2nyolopbis7iaw-2ds×5enuawaiyrftbyhktba-o" is invalid: metadata. labels: Invalid value:
"jupyter-nb-Luhwvfk2nyoLopb]s7iaw-2d5x5enuawaiyrftbyhktba-f9ccb69cg"; must be no more than 63 characters

Is there any workaround currently available, other than making sure that the username does not exceed 42 characters?

@zdtsw
Copy link
Member

zdtsw commented Aug 28, 2023

isnt that something as the label controller-revision-hash created on statefulset pod automatically by k8s, which append extra 10 characters?
plus the suffix "jupyter-nb-" with 10 characters, and the limitation of k8s that label with max 64 characters,
so the user name can only limit to 63-10-10 = 43

@durandom
Copy link
Member Author

Correct. I think this limit is too short, eg if you have the UID of active directory or an email as the username.
Would be better if the username gets hashed to avoid that limit

@zdtsw
Copy link
Member

zdtsw commented Aug 29, 2023

FYI @harshad16

@harshad16
Copy link
Member

Thanks for pointing me to this.
I would have to take a look at our kubeflow-notebook controller level, to get this fixed.

@zdtsw
Copy link
Member

zdtsw commented Sep 3, 2023

should we transfer this issue to https://github.com/opendatahub-io/kubeflow?

@harshad16
Copy link
Member

/transfer kubeflow

1 similar comment
@zdtsw
Copy link
Member

zdtsw commented Sep 27, 2023

/transfer kubeflow

@openshift-ci openshift-ci bot transferred this issue from opendatahub-io/opendatahub-operator Sep 27, 2023
@knorr3
Copy link

knorr3 commented Feb 19, 2024

I am currently facing this issue when trying to create a Jupyter notebook. My username is an email address that consists of 30 characters. After encoding, it has 41 characters. In total, the route name would be 93 characters long.
Is there any workaround to access the Jupyter notebooks?

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

No branches or pull requests

4 participants