From c87b74c59971811819e2d9e9861d888196011ca2 Mon Sep 17 00:00:00 2001 From: Lukas Piwowarski Date: Wed, 19 Nov 2025 11:08:04 -0500 Subject: [PATCH] Add additionalPrinterColumns to OpenStackLightspeed CRD Add status and message printColumns to the OpenStackLightspeed CRD to display condition status in oc get openstacklightspeed output. --- api/v1beta1/openstacklightspeed_types.go | 2 ++ ...lightspeed.openstack.org_openstacklightspeeds.yaml | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/api/v1beta1/openstacklightspeed_types.go b/api/v1beta1/openstacklightspeed_types.go index 15e826aa..c35b447f 100644 --- a/api/v1beta1/openstacklightspeed_types.go +++ b/api/v1beta1/openstacklightspeed_types.go @@ -90,6 +90,8 @@ type OpenStackLightspeedStatus struct { // +kubebuilder:object:root=true // +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[0].status",description="Status" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[0].message",description="Message" // OpenStackLightspeed is the Schema for the openstacklightspeeds API type OpenStackLightspeed struct { diff --git a/config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml b/config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml index 391650a7..b4654487 100644 --- a/config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml +++ b/config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml @@ -14,7 +14,16 @@ spec: singular: openstacklightspeed scope: Namespaced versions: - - name: v1beta1 + - additionalPrinterColumns: + - description: Status + jsonPath: .status.conditions[0].status + name: Status + type: string + - description: Message + jsonPath: .status.conditions[0].message + name: Message + type: string + name: v1beta1 schema: openAPIV3Schema: description: OpenStackLightspeed is the Schema for the openstacklightspeeds