webmeshproj / webmesh-vdi

A Kubernetes-native Virtual Desktop Infrastructure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with PersistentVolumeClaim

lomori opened this issue · comments

Hi,

First, let me say that you guys are doing an awesome job for this project!

My use case calls for the ability for users to store some data on their home directory. I saw that this feature is supposed to be available by defining the userdataSpec element during deployment. The documentation indicates that in this case, there will be a PersistentVolume for each user. That doesn't seem to be working. The first user that logs in gets one, and that same one is then re-used for all other users. In fact, that is also preventing two users to be logged in at the same time as the second instance of the desktop pod is stuck waiting for the persistent volume to be available, but that is being held by the first instance. Also noticed that the volume mapping seems suspicious as my two users have the same pvc assigned. See below.

apiVersion: v1
kind: ConfigMap
metadata:
  name: kvdi-userdata-volume-map
  namespace: vdi
data:
  admin: pvc-93576f47-1f8c-4135-adee-47da89d813ba
  test.user: pvc-93576f47-1f8c-4135-adee-47da89d813ba

I'm using this values.yaml to along with helm to deploy kvdi under vdi namespace:

vdi:
  spec:
    appNamespace: vdi
    auth:
      tokenDuration: 8h
    userdataSpec:
      resources:
        requests:
          storage: 10Gi
      accessModes:
      - ReadWriteOnce

This is happening on GKE. The image I'm using for the template is ghcr.io/tinyzimmer/kvdi:ubuntu-xfce4-latest.

Regards,
Luiz

Never mind, sorry, my bad. This handles it: retainPVCs: true.

vdi:
  spec:
    appNamespace: vdi
    auth:
      tokenDuration: 8h
    userdataSpec:
      resources:
        requests:
          storage: 10Gi
      accessModes:
      - ReadWriteOnce
      retainPVCs: true