From d420a6668f69e2f14f4048a563b83883d133c081 Mon Sep 17 00:00:00 2001 From: Angel Misevski Date: Mon, 1 Feb 2021 12:28:23 -0500 Subject: [PATCH 1/2] Remove ideUrl from DevWorkspace printcolumns; reuse message instead Since the addition of .status.message, the output for `kubectl get dw` has become unweildy -- either .status.message is populated with an error message or .status.ideUrl is populated with the URL at which to access the workspace. To clean this up, remove the printcolumn for .status.ideUrl and repurpose .status.message to show the URL to the user. Signed-off-by: Angel Misevski --- pkg/apis/workspaces/v1alpha2/devworkspace_types.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/apis/workspaces/v1alpha2/devworkspace_types.go b/pkg/apis/workspaces/v1alpha2/devworkspace_types.go index 0cd332ba6..03055b8b6 100644 --- a/pkg/apis/workspaces/v1alpha2/devworkspace_types.go +++ b/pkg/apis/workspaces/v1alpha2/devworkspace_types.go @@ -72,8 +72,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" +// +kubebuilder:printcolumn:name="Info",type="string",JSONPath=".status.message",description="Additional information about the workspace" // +devfile:jsonschema:generate // +kubebuilder:storageversion type DevWorkspace struct { From 2db8dd99631ed71f74c2fd23e1037af53b12398f Mon Sep 17 00:00:00 2001 From: Angel Misevski Date: Mon, 1 Feb 2021 12:32:28 -0500 Subject: [PATCH 2/2] Regenerate CRDs after changing printcolumns for ideUrl Signed-off-by: Angel Misevski --- crds/workspace.devfile.io_devworkspaces.v1beta1.yaml | 6 +----- crds/workspace.devfile.io_devworkspaces.yaml | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml index c14c6050e..4a6a5d32b 100644 --- a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml +++ b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml @@ -4088,13 +4088,9 @@ spec: name: Phase type: string - JSONPath: .status.message - description: Additional information about workspace state + description: Additional information about the workspace name: Info type: string - - JSONPath: .status.ideUrl - description: Url endpoint for accessing workspace - name: URL - type: string name: v1alpha2 schema: openAPIV3Schema: diff --git a/crds/workspace.devfile.io_devworkspaces.yaml b/crds/workspace.devfile.io_devworkspaces.yaml index c4dbf1f8c..3a8ef108d 100644 --- a/crds/workspace.devfile.io_devworkspaces.yaml +++ b/crds/workspace.devfile.io_devworkspaces.yaml @@ -4085,14 +4085,10 @@ spec: jsonPath: .status.phase name: Phase type: string - - description: Additional information about workspace state + - description: Additional information about the workspace jsonPath: .status.message name: Info type: string - - description: Url endpoint for accessing workspace - jsonPath: .status.ideUrl - name: URL - type: string name: v1alpha2 schema: openAPIV3Schema: