diff --git a/deploy/crds/workspace.devfile.io_devworkspaces_crd.yaml b/deploy/crds/workspace.devfile.io_devworkspaces_crd.yaml index fae3c18eb..6f9d703e8 100644 --- a/deploy/crds/workspace.devfile.io_devworkspaces_crd.yaml +++ b/deploy/crds/workspace.devfile.io_devworkspaces_crd.yaml @@ -3,6 +3,19 @@ kind: CustomResourceDefinition metadata: 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 diff --git a/pkg/apis/workspaces/v1alpha1/devworkspace_types.go b/pkg/apis/workspaces/v1alpha1/devworkspace_types.go index 973475b4d..afee19531 100644 --- a/pkg/apis/workspaces/v1alpha1/devworkspace_types.go +++ b/pkg/apis/workspaces/v1alpha1/devworkspace_types.go @@ -67,6 +67,9 @@ const ( // +k8s:openapi-gen=true // +kubebuilder:subresource:status // +kubebuilder:resource:path=devworkspaces,scope=Namespaced +// +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="URL",type="string",JSONPath=".status.ideUrl",description="Url endpoint for accessing workspace" type DevWorkspace struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"`