diff --git a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml index b0e60283b..ea919758d 100644 --- a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml +++ b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml @@ -6,19 +6,6 @@ metadata: creationTimestamp: null name: devworkspaces.workspace.devfile.io spec: - additionalPrinterColumns: - - JSONPath: .status.workspaceId - description: The workspace's unique id - name: Workspace ID - type: string - - JSONPath: .status.phase - description: The current workspace startup phase - name: Phase - type: string - - JSONPath: .status.ideUrl - description: Url endpoint for accessing workspace - name: URL - type: string group: workspace.devfile.io names: kind: DevWorkspace @@ -33,7 +20,20 @@ spec: status: {} version: v1alpha1 versions: - - name: v1alpha1 + - additionalPrinterColumns: + - JSONPath: .status.workspaceId + description: The workspace's unique id + name: Workspace ID + type: string + - JSONPath: .status.phase + description: The current workspace startup phase + name: Phase + type: string + - JSONPath: .status.ideUrl + description: Url endpoint for accessing workspace + name: URL + type: string + name: v1alpha1 schema: openAPIV3Schema: description: DevWorkspace is the Schema for the devworkspaces API @@ -4063,6 +4063,10 @@ spec: ideUrl: description: URL at which the Worksace Editor can be joined type: string + message: + description: Message is a short user-readable message giving additional + information about an object's state + type: string phase: type: string workspaceId: @@ -4074,7 +4078,24 @@ spec: type: object served: true storage: false - - name: v1alpha2 + - additionalPrinterColumns: + - JSONPath: .status.workspaceId + description: The workspace's unique id + name: Workspace ID + type: string + - JSONPath: .status.phase + description: The current workspace startup phase + name: Phase + type: string + - JSONPath: .status.message + description: Additional information about workspace state + name: Info + type: string + - JSONPath: .status.ideUrl + description: Url endpoint for accessing workspace + name: URL + type: string + name: v1alpha2 schema: openAPIV3Schema: description: DevWorkspace is the Schema for the devworkspaces API @@ -7725,6 +7746,10 @@ spec: ideUrl: description: URL at which the Worksace Editor can be joined type: string + message: + description: Message is a short user-readable message giving additional + information about an object's state + type: string phase: type: string workspaceId: diff --git a/crds/workspace.devfile.io_devworkspaces.yaml b/crds/workspace.devfile.io_devworkspaces.yaml index 9eb74465f..dacafd0af 100644 --- a/crds/workspace.devfile.io_devworkspaces.yaml +++ b/crds/workspace.devfile.io_devworkspaces.yaml @@ -4059,6 +4059,10 @@ spec: ideUrl: description: URL at which the Worksace Editor can be joined type: string + message: + description: Message is a short user-readable message giving additional + information about an object's state + type: string phase: type: string workspaceId: @@ -4081,6 +4085,10 @@ spec: jsonPath: .status.phase name: Phase type: string + - description: Additional information about workspace state + jsonPath: .status.message + name: Info + type: string - description: Url endpoint for accessing workspace jsonPath: .status.ideUrl name: URL @@ -7743,6 +7751,10 @@ spec: ideUrl: description: URL at which the Worksace Editor can be joined type: string + message: + description: Message is a short user-readable message giving additional + information about an object's state + type: string phase: type: string workspaceId: diff --git a/pkg/apis/workspaces/v1alpha1/conversion.go b/pkg/apis/workspaces/v1alpha1/conversion.go index 0d8068711..a6e0469a5 100644 --- a/pkg/apis/workspaces/v1alpha1/conversion.go +++ b/pkg/apis/workspaces/v1alpha1/conversion.go @@ -9,6 +9,7 @@ func convertDevWorkspaceTo_v1alpha2(src *DevWorkspace, dest *v1alpha2.DevWorkspa dest.Status.WorkspaceId = src.Status.WorkspaceId dest.Status.IdeUrl = src.Status.IdeUrl dest.Status.Phase = v1alpha2.WorkspacePhase(src.Status.Phase) + dest.Status.Message = src.Status.Message convertConditionsTo_v1alpha2(src, dest) dest.Spec.RoutingClass = src.Spec.RoutingClass dest.Spec.Started = src.Spec.Started @@ -21,6 +22,7 @@ func convertDevWorkspaceFrom_v1alpha2(src *v1alpha2.DevWorkspace, dest *DevWorks dest.Status.WorkspaceId = src.Status.WorkspaceId dest.Status.IdeUrl = src.Status.IdeUrl dest.Status.Phase = WorkspacePhase(src.Status.Phase) + dest.Status.Message = src.Status.Message convertConditionsFrom_v1alpha2(src, dest) dest.Spec.RoutingClass = src.Spec.RoutingClass dest.Spec.Started = src.Spec.Started diff --git a/pkg/apis/workspaces/v1alpha1/devworkspace_types.go b/pkg/apis/workspaces/v1alpha1/devworkspace_types.go index 7f2b9b0bb..91643af5d 100644 --- a/pkg/apis/workspaces/v1alpha1/devworkspace_types.go +++ b/pkg/apis/workspaces/v1alpha1/devworkspace_types.go @@ -23,6 +23,9 @@ type DevWorkspaceStatus struct { Phase WorkspacePhase `json:"phase,omitempty"` // Conditions represent the latest available observations of an object's state Conditions []WorkspaceCondition `json:"conditions,omitempty"` + // Message is a short user-readable message giving additional information + // about an object's state + Message string `json:"message,omitempty"` } type WorkspacePhase string diff --git a/pkg/apis/workspaces/v1alpha2/devworkspace_types.go b/pkg/apis/workspaces/v1alpha2/devworkspace_types.go index 54a364c03..ab9bec8fb 100644 --- a/pkg/apis/workspaces/v1alpha2/devworkspace_types.go +++ b/pkg/apis/workspaces/v1alpha2/devworkspace_types.go @@ -21,6 +21,9 @@ type DevWorkspaceStatus struct { Phase WorkspacePhase `json:"phase,omitempty"` // Conditions represent the latest available observations of an object's state Conditions []WorkspaceCondition `json:"conditions,omitempty"` + // Message is a short user-readable message giving additional information + // about an object's state + Message string `json:"message,omitempty"` } type WorkspacePhase string @@ -67,6 +70,7 @@ const ( // +kubebuilder:resource:path=devworkspaces,scope=Namespaced,shortName=dw // +kubebuilder:printcolumn:name="Workspace ID",type="string",JSONPath=".status.workspaceId",description="The workspace's unique id" // +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="The current workspace startup phase" +// +kubebuilder:printcolumn:name="Info",type="string",JSONPath=".status.message",description="Additional information about workspace state" // +kubebuilder:printcolumn:name="URL",type="string",JSONPath=".status.ideUrl",description="Url endpoint for accessing workspace" // +devfile:jsonschema:generate // +kubebuilder:storageversion diff --git a/schemas/latest/dev-workspace.json b/schemas/latest/dev-workspace.json index 608e7399e..145d04f0f 100644 --- a/schemas/latest/dev-workspace.json +++ b/schemas/latest/dev-workspace.json @@ -3672,6 +3672,10 @@ "description": "URL at which the Worksace Editor can be joined", "type": "string" }, + "message": { + "description": "Message is a short user-readable message giving additional information about an object's state", + "type": "string" + }, "phase": { "type": "string" }, diff --git a/schemas/latest/ide-targeted/dev-workspace.json b/schemas/latest/ide-targeted/dev-workspace.json index 6c7433533..7a46db03a 100644 --- a/schemas/latest/ide-targeted/dev-workspace.json +++ b/schemas/latest/ide-targeted/dev-workspace.json @@ -4105,6 +4105,11 @@ "type": "string", "markdownDescription": "URL at which the Worksace Editor can be joined" }, + "message": { + "description": "Message is a short user-readable message giving additional information about an object's state", + "type": "string", + "markdownDescription": "Message is a short user-readable message giving additional information about an object's state" + }, "phase": { "type": "string" },