Skip to content

Commit b2fe4e2

Browse files
committed
Add 'message' field to DevWorkspace Status
Signed-off-by: Angel Misevski <[email protected]>
1 parent 62febdb commit b2fe4e2

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

pkg/apis/workspaces/v1alpha1/conversion.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ func convertDevWorkspaceTo_v1alpha2(src *DevWorkspace, dest *v1alpha2.DevWorkspa
99
dest.Status.WorkspaceId = src.Status.WorkspaceId
1010
dest.Status.IdeUrl = src.Status.IdeUrl
1111
dest.Status.Phase = v1alpha2.WorkspacePhase(src.Status.Phase)
12+
dest.Status.Message = src.Status.Message
1213
convertConditionsTo_v1alpha2(src, dest)
1314
dest.Spec.RoutingClass = src.Spec.RoutingClass
1415
dest.Spec.Started = src.Spec.Started
@@ -21,6 +22,7 @@ func convertDevWorkspaceFrom_v1alpha2(src *v1alpha2.DevWorkspace, dest *DevWorks
2122
dest.Status.WorkspaceId = src.Status.WorkspaceId
2223
dest.Status.IdeUrl = src.Status.IdeUrl
2324
dest.Status.Phase = WorkspacePhase(src.Status.Phase)
25+
dest.Status.Message = src.Status.Message
2426
convertConditionsFrom_v1alpha2(src, dest)
2527
dest.Spec.RoutingClass = src.Spec.RoutingClass
2628
dest.Spec.Started = src.Spec.Started

pkg/apis/workspaces/v1alpha1/devworkspace_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ type DevWorkspaceStatus struct {
2323
Phase WorkspacePhase `json:"phase,omitempty"`
2424
// Conditions represent the latest available observations of an object's state
2525
Conditions []WorkspaceCondition `json:"conditions,omitempty"`
26+
// Message is a short user-readable message giving additional information
27+
// about an object's state
28+
Message string `json:"message,omitempty"`
2629
}
2730

2831
type WorkspacePhase string

pkg/apis/workspaces/v1alpha2/devworkspace_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ type DevWorkspaceStatus struct {
2121
Phase WorkspacePhase `json:"phase,omitempty"`
2222
// Conditions represent the latest available observations of an object's state
2323
Conditions []WorkspaceCondition `json:"conditions,omitempty"`
24+
// Message is a short user-readable message giving additional information
25+
// about an object's state
26+
Message string `json:"message,omitempty"`
2427
}
2528

2629
type WorkspacePhase string
@@ -67,6 +70,7 @@ const (
6770
// +kubebuilder:resource:path=devworkspaces,scope=Namespaced,shortName=dw
6871
// +kubebuilder:printcolumn:name="Workspace ID",type="string",JSONPath=".status.workspaceId",description="The workspace's unique id"
6972
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="The current workspace startup phase"
73+
// +kubebuilder:printcolumn:name="Info",type="string",JSONPath=".status.message",description="Additional information about workspace state"
7074
// +kubebuilder:printcolumn:name="URL",type="string",JSONPath=".status.ideUrl",description="Url endpoint for accessing workspace"
7175
// +devfile:jsonschema:generate
7276
// +kubebuilder:storageversion

0 commit comments

Comments
 (0)