Description
Since #826, the shared PVC should be deleted when no workspaces that use it exist. However, if there are multiple workspaces that use the common PVC deleted at the same time, they will each instead run the cleanup job.
Once all but one cleanup job completes, DWO deletes the shared PVC as expected and removes the finalizer from the last workspace, even if the cleanup job is not complete.
How To Reproduce
foriin {1..5};do
yq --arg i "$i"'.metadata.name="theia-next-\($i)"' samples/theia-next.yaml | kubectl apply -f -
sleep 2s
kubectl patch dw "theia-next-$i" --type merge -p '{"spec": {"started": false}}'done
kubectl delete dw --all --wait=false && kubectl get jobs -wExpected behavior
If all workspaces that depend on common storage are being terminated, we can just delete the PVC and remove their finalizers.
Additional context
Description
Since #826, the shared PVC should be deleted when no workspaces that use it exist. However, if there are multiple workspaces that use the common PVC deleted at the same time, they will each instead run the cleanup job.
Once all but one cleanup job completes, DWO deletes the shared PVC as expected and removes the finalizer from the last workspace, even if the cleanup job is not complete.
How To Reproduce
Expected behavior
If all workspaces that depend on common storage are being terminated, we can just delete the PVC and remove their finalizers.
Additional context