Skip to content

Commit 45d962c

Browse files
committed
Add error DevWorkspace Phase and ConditionType
Add an error Phase to DevWorkspace status and a corresponding ConditionType. The error phase is used to represent server-side errors than impact the DevWorkspace (e.g. failed to clean up storage when deleting a workspace). Signed-off-by: Angel Misevski <[email protected]>
1 parent f3fa280 commit 45d962c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

pkg/apis/workspaces/v1alpha1/devworkspace_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const (
3737
WorkspaceStatusStopped WorkspacePhase = "Stopped"
3838
WorkspaceStatusStopping WorkspacePhase = "Stopping"
3939
WorkspaceStatusFailed WorkspacePhase = "Failed"
40+
WorkspaceStatusError WorkspacePhase = "Error"
4041
)
4142

4243
// WorkspaceCondition contains details for the current condition of this workspace.
@@ -63,6 +64,7 @@ const (
6364
WorkspaceServiceAccountReady WorkspaceConditionType = "ServiceAccountReady"
6465
WorkspaceReady WorkspaceConditionType = "Ready"
6566
WorkspaceFailedStart WorkspaceConditionType = "FailedStart"
67+
WorkspaceError WorkspaceConditionType = "Error"
6668
)
6769

6870
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

pkg/apis/workspaces/v1alpha2/devworkspace_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const (
3535
WorkspaceStatusStopped WorkspacePhase = "Stopped"
3636
WorkspaceStatusStopping WorkspacePhase = "Stopping"
3737
WorkspaceStatusFailed WorkspacePhase = "Failed"
38+
WorkspaceStatusError WorkspacePhase = "Error"
3839
)
3940

4041
// WorkspaceCondition contains details for the current condition of this workspace.
@@ -61,6 +62,7 @@ const (
6162
WorkspaceServiceAccountReady WorkspaceConditionType = "ServiceAccountReady"
6263
WorkspaceReady WorkspaceConditionType = "Ready"
6364
WorkspaceFailedStart WorkspaceConditionType = "FailedStart"
65+
WorkspaceError WorkspaceConditionType = "Error"
6466
)
6567

6668
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

0 commit comments

Comments
 (0)