jupyterhub / kubespawner

Kubernetes spawner for JupyterHub
https://jupyterhub-kubespawner.readthedocs.io
BSD 3-Clause "New" or "Revised" License
536 stars 301 forks source link

subpath of {username} is escaped when it should not be #754

Closed jabbera closed 1 year ago

jabbera commented 1 year ago

Bug description

When using extraVolumeMounts and subPath: {username} is escaped when it should not be. This causes a user with name: svc-blah who has a home folder: nfsroot/svc-blah to be not found because kubespawner is looking for nfsroot/svc-2dblah incorrectly. File systems don't have the same limitations as k8s and should use the unescaped name IMO:

    extraVolumeMounts:
    - name: claim-nfs-user-root
      mountPath: /mnt/z
      subPath: '{username}'

Expected behaviour

username should not be escaped

Actual behaviour

username is escaped

welcome[bot] commented 1 year ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

jabbera commented 1 year ago

I found the unescaped_username variable. Will use that.