Skip to content

Commit b58ecec

Browse files
jentingroboquat
authored andcommitted
Revert "ws-manager: remove PVC object if the workspace pod fails to up"
This reverts commit 28fae90. Signed-off-by: JenTing Hsiao <[email protected]>
1 parent 80e87ad commit b58ecec

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

components/ws-manager/pkg/manager/monitor.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -300,18 +300,6 @@ func actOnPodEvent(ctx context.Context, m actingManager, manager *Manager, statu
300300
return xerrors.Errorf("cannot stop workspace: %w", err)
301301
}
302302

303-
// Delete PVC if it exists
304-
// Note that: the PVC removal is postponed until the PVC is no longer actively used by its workspace pod.
305-
// Therefore, the PVC is removed after the workspace pod finalizer is removed.
306-
// No data loss unless we remove the workspace pod finalizer incorrectly.
307-
_, createPVC := pod.Labels[pvcWorkspaceFeatureLabel]
308-
if !createPVC {
309-
return nil
310-
}
311-
err = manager.deleteWorkspacePVC(ctx, pod.Name)
312-
if err != nil {
313-
return xerrors.Errorf("cannot remove PVC: %w", err)
314-
}
315303
return nil
316304
} else if status.Conditions.StoppedByRequest == api.WorkspaceConditionBool_TRUE {
317305
span.LogKV("event", "stopped by request")

0 commit comments

Comments
 (0)