From a72917a01e1ef62d4eefb67f4773eff779b7b27e Mon Sep 17 00:00:00 2001 From: Andrew Bays Date: Tue, 5 Nov 2024 20:22:59 +0000 Subject: [PATCH] Add missing status message to Redis resource CLI --- apis/bases/redis.openstack.org_redises.yaml | 11 ++++++++++- apis/redis/v1beta1/redis_types.go | 10 ++++++---- config/crd/bases/redis.openstack.org_redises.yaml | 11 ++++++++++- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/apis/bases/redis.openstack.org_redises.yaml b/apis/bases/redis.openstack.org_redises.yaml index 13751669..a003f164 100644 --- a/apis/bases/redis.openstack.org_redises.yaml +++ b/apis/bases/redis.openstack.org_redises.yaml @@ -15,7 +15,16 @@ spec: singular: redis 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: Redis is the Schema for the redises API diff --git a/apis/redis/v1beta1/redis_types.go b/apis/redis/v1beta1/redis_types.go index 9b032efd..fc3e5cb0 100644 --- a/apis/redis/v1beta1/redis_types.go +++ b/apis/redis/v1beta1/redis_types.go @@ -29,10 +29,10 @@ const ( // RedisContainerImage is the fall-back container image for Redis RedisContainerImage = "quay.io/podified-antelope-centos9/openstack-redis:current-podified" - // CrMaxLengthCorrection - DNS1123LabelMaxLength (63) - CrMaxLengthCorrection used in validation to - // omit issue with statefulset pod label "controller-revision-hash": "-" - // Int32 is a 10 character + hyphen = 11 - CrMaxLengthCorrection = 11 + // CrMaxLengthCorrection - DNS1123LabelMaxLength (63) - CrMaxLengthCorrection used in validation to + // omit issue with statefulset pod label "controller-revision-hash": "-" + // Int32 is a 10 character + hyphen = 11 + CrMaxLengthCorrection = 11 ) // RedisSpec defines the desired state of Redis @@ -73,6 +73,8 @@ type RedisStatus struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status //+kubebuilder:resource:path=redises +//+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" // Redis is the Schema for the redises API type Redis struct { diff --git a/config/crd/bases/redis.openstack.org_redises.yaml b/config/crd/bases/redis.openstack.org_redises.yaml index 13751669..a003f164 100644 --- a/config/crd/bases/redis.openstack.org_redises.yaml +++ b/config/crd/bases/redis.openstack.org_redises.yaml @@ -15,7 +15,16 @@ spec: singular: redis 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: Redis is the Schema for the redises API