Mount pv based on script on user pod

When the user pod starts I want to mount their personal pv and also run a script to find the names of other pv to mount. And then mount those also to the user pod.

Any ideas about a good way to implement this? Will i need to fork jupyterhub and build my own image?

In my case I am using azure and the script would connect to active directory and find groups the user belongs to which corresponds to pv names that will be mounted.

Thanks,
Mike

I am thinking the customization point is in kubespawner. https://github.com/jupyterhub/kubespawner

Looks like I can use modify_pod_hook to add the volumes to mount. Assuming I can make the call to azure from there and import the libraries I need.