Skip to content

Commit 12d6771

Browse files
committed
Print Status and Message on Cyborg objects
Similar to for CyborgAPI and CyborgConductor and other OpenStack CRDs. Signed-off-by: Alfredo Moralejo <amoralej@redhat.com>
1 parent 9ba68e1 commit 12d6771

3 files changed

Lines changed: 22 additions & 2 deletions

File tree

api/bases/cyborg.openstack.org_cyborgs.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@ spec:
1414
singular: cyborg
1515
scope: Namespaced
1616
versions:
17-
- name: v1beta1
17+
- additionalPrinterColumns:
18+
- description: Status
19+
jsonPath: .status.conditions[0].status
20+
name: Status
21+
type: string
22+
- description: Message
23+
jsonPath: .status.conditions[0].message
24+
name: Message
25+
type: string
26+
name: v1beta1
1827
schema:
1928
openAPIV3Schema:
2029
description: Cyborg is the Schema for the cyborgs API.

api/cyborg/v1beta1/cyborg_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ type CyborgStatus struct {
135135

136136
// +kubebuilder:object:root=true
137137
// +kubebuilder:subresource:status
138+
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[0].status",description="Status"
139+
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[0].message",description="Message"
138140

139141
// Cyborg is the Schema for the cyborgs API.
140142
type Cyborg struct {

config/crd/bases/cyborg.openstack.org_cyborgs.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@ spec:
1414
singular: cyborg
1515
scope: Namespaced
1616
versions:
17-
- name: v1beta1
17+
- additionalPrinterColumns:
18+
- description: Status
19+
jsonPath: .status.conditions[0].status
20+
name: Status
21+
type: string
22+
- description: Message
23+
jsonPath: .status.conditions[0].message
24+
name: Message
25+
type: string
26+
name: v1beta1
1827
schema:
1928
openAPIV3Schema:
2029
description: Cyborg is the Schema for the cyborgs API.

0 commit comments

Comments
 (0)