devfile / devworkspace-operator

Apache License 2.0
59 stars 49 forks source link

persistUserHome does not work with per-workspace storage strategy #1238

Closed AObuchow closed 3 months ago

AObuchow commented 3 months ago

Description

Enabling persistUserHome in the DWOC does not add a persistent home devfile volume to a devworkspace when the per-workspace storage strategy is used. This is a regression caused by https://github.com/devfile/devworkspace-operator/pull/1210/files#diff-05e72230161a4d41c5a27fb453041c78839c193a9ddcb5066b1cb62c5a399529R294: we call the storage provisioner's NeedsStorage() function, however the implementation of this function for per-workspace storage always returns false.

How To Reproduce

  1. Set workspace.persistUserHome.enabled: true in the DWOC
  2. Apply the per-workspace-storage.yaml sample: kubectl apply -f ./samples/per-workspace-storage.yaml
  3. Check the devworkspace's pod spec and see there is no volumeMount for /home/user/

    Expected behavior

Additional context

Downstream issue