Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit 7a96780

Browse files
authored
Merge pull request #136 from jtyr/jtyr-list
Adding status into the list of Workspaces
2 parents 0c7c35a + db04fb1 commit 7a96780

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

api/v1alpha1/workspace_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ type WorkspaceStatus struct {
168168
// +k8s:openapi-gen=true
169169
// +kubebuilder:subresource:status
170170
// +kubebuilder:resource:path=workspaces,scope=Namespaced
171+
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
172+
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.runStatus`
171173
type Workspace struct {
172174
metav1.TypeMeta `json:",inline"`
173175
metav1.ObjectMeta `json:"metadata,omitempty"`

config/crd/bases/app.terraform.io_workspaces.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ spec:
1515
singular: workspace
1616
scope: Namespaced
1717
versions:
18-
- name: v1alpha1
18+
- additionalPrinterColumns:
19+
- jsonPath: .metadata.creationTimestamp
20+
name: Age
21+
type: date
22+
- jsonPath: .status.runStatus
23+
name: Status
24+
type: string
25+
name: v1alpha1
1926
schema:
2027
openAPIV3Schema:
2128
description: Workspace is the Schema for the workspaces API

0 commit comments

Comments
 (0)