Load persistent data to workspaces

hello - we are running a self-hosted Gitpod install on our hybrid k8s (metal+aws). We have the need to load / mount / expose a decent chunk of data to the workspaces and are struggling with a good way of doing this.

Data is available in the k8s as PVCs or can be exposed to each node as a local nfs folder (which could be bound to a container)

Are there any options to mount PVCs, or have any external data mounted to the workspace without going through the internet?

Any help greatly appreciated

first ‘hacky’ solution would be to mount the nfs drive to the workspace default mount in each node /mnt/gitpod/ws/[workspace-id] … however this isnt working very well with backups and gracefully stopping of workspaces.

we have looked at this file where the workspace is created and such local dir is bound to the workspace - is there any way to add or patch the deployment so that another PVC can be mounted at workspace startup? assuming that such PV exists in the k8s

1 Like

Hi @ottave, welcome to the Gitpod community! :tada:

Maybe you could add that volume to the workspace template (e.g. here) and mount it as an NFS Volume?

many thanks @jan for the suggestion, we tried modifying that file but the changes were not picked up at workspace creation. maybe we are missing something obvious on how to apply the patch? do we need to fork the helm chart and deploy it with the change or is there an easier way to apply a custom template to the deployment?

so we did try to modify the workspace template.yaml file, both by patching it in an helm upgrade as well on a clean install from a modified repo / helm chart where the volumes where hardcoded. Nothing helped.

We are looking at modifying create.go now - any suggestion on how to go about it?