Hey everyone,
I’m looking for a way to set up a profile list that can assign and select persistent storage based on the user. Ideally, each user would have their own dedicated storage that can be automatically selected when pod is initialize. Has anyone done something similar, or have any recommendations on tools or methods to achieve this?
Any advice or suggestions would be appreciated! Thanks!
Hi,
I am also interested in such a solution.
Basically, z2jh already creates a persistent volume per user and this is very nice.
We would like to also mount an extra shared volume for a limited set of “higly-privileged” users in order to allow them to exchange data easily. Is there a configuration for that ?
Thanks for your help
There isn’t. Z2JH uses declarative configuration to defines the user volumes, which are translated into KubeSpawner configuration.
Profiles/overrides are handled at the KubeSpawner level, so you can’t modify the volumes declared by Z2JH. Instead you’ll have to redefine the config.
This is the Z2JH code that converts the config into something that KubeSpawner handles:
If you wanted to do this in a profile/override I think you could set
KubeSpawner.pvc_name_template (you can use predefined templates for per-user volumes)
KubeSpawner.storage_pvc_ensure to automatically create the per-user PVC (pvc_name_template)
KubeSpawner.volumes is the list of volumes, which would need to be the per-user volume, plus a statically defined shared volume if you want. This static volume needs to be created by you in advance, storage_pvc_ensure only works for the per-user storage
KubeSpawner.volume_mounts is where you’d want to mount those volumes