SwissDataScienceCenter / amalthea

A kubernetes operator for spawning and exposing jupyter servers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot make sessions for users whose username starts with a number

rokroskar opened this issue · comments

kubernetes pod names cannot start with a number, but since those are valid usernames and pod names start with the username, this leads to some users unable to create sessions. For example:

3emefilsju-course-2dlexplore-2dheat-84383d40\\\\\\\\\\\\\\\\\\\" is invalid: metadata.name: Invalid value: \\\\\\\\\\\\\\\\\\\"3emefilsju-course-2dlexplore-2dheat-84383d40\\\\\\\\\\\\\\\\\\\": a DNS-1035 label must consist of lower case alphanumeric characters or \\\\\\\\\\\\'-\\\\\\\\\\\\', start with an alphabetic character, and end with an alphanumeric character (e.g. \\\\\\\\\\\\'my-name\\\\\\\\\\\\',  or \\\\\\\\\\\\'abc-123\\\\\\\\\\\\', regex used for validation is \\\\\\\\\\\\'[a-z]([-a-z0-9]*[a-z0-9])?\\\\\\\\\\\\')

We should escape the names that start with a number or always add a letter to the front.

This should have been fixed in SwissDataScienceCenter/renku-notebooks#1213. Not sure how it is happening again. Will check.

I checked the specific session. It is leftover from a session that was launched before the fix was deployed.

I also created an account to test this problem again and I could not replicate and I got the expected behaviour that the fix is imposing now.