Skip to content

Add additional field to devworkspace status for showing info to users #221

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 2 commits into from
Dec 22, 2020
Merged
Show file tree
Hide file tree
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
55 changes: 40 additions & 15 deletions crds/workspace.devfile.io_devworkspaces.v1beta1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
12 changes: 12 additions & 0 deletions crds/workspace.devfile.io_devworkspaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/workspaces/v1alpha1/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/workspaces/v1alpha1/devworkspace_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/workspaces/v1alpha2/devworkspace_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions schemas/latest/dev-workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
5 changes: 5 additions & 0 deletions schemas/latest/ide-targeted/dev-workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down