Skip to content

Revert "ws-manager: remove PVC object if the workspace pod fails to up" #13655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions components/ws-manager/pkg/manager/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,18 +300,6 @@ func actOnPodEvent(ctx context.Context, m actingManager, manager *Manager, statu
return xerrors.Errorf("cannot stop workspace: %w", err)
}

// Delete PVC if it exists
// Note that: the PVC removal is postponed until the PVC is no longer actively used by its workspace pod.
// Therefore, the PVC is removed after the workspace pod finalizer is removed.
// No data loss unless we remove the workspace pod finalizer incorrectly.
_, createPVC := pod.Labels[pvcWorkspaceFeatureLabel]
if !createPVC {
return nil
}
err = manager.deleteWorkspacePVC(ctx, pod.Name)
if err != nil {
return xerrors.Errorf("cannot remove PVC: %w", err)
}
return nil
} else if status.Conditions.StoppedByRequest == api.WorkspaceConditionBool_TRUE {
span.LogKV("event", "stopped by request")
Expand Down