From 913d02a02b9157ece7dca1da974edef3f6969889 Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Fri, 26 Sep 2025 09:19:15 -0700 Subject: [PATCH] core: add PHASE column to cephbn The current behavior does not print the PHASE column, as most other CRDs do. E.g.: ``` ~ $ k get cephbn chorus NAME AGE chorus 10d ``` Signed-off-by: Joshua Hoblitt (cherry picked from commit 8866d47d92a6ff23d3be70b1d954a532a56dea95) --- deploy/charts/rook-ceph/templates/resources.yaml | 9 ++++++++- deploy/examples/crds.yaml | 9 ++++++++- pkg/apis/ceph.rook.io/v1/types.go | 2 ++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/deploy/charts/rook-ceph/templates/resources.yaml b/deploy/charts/rook-ceph/templates/resources.yaml index f5107397d..bb4b4c28b 100644 --- a/deploy/charts/rook-ceph/templates/resources.yaml +++ b/deploy/charts/rook-ceph/templates/resources.yaml @@ -897,7 +897,14 @@ spec: singular: cephbucketnotification scope: Namespaced versions: - - name: v1 + - additionalPrinterColumns: + - jsonPath: .status.phase + name: Phase + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 schema: openAPIV3Schema: description: CephBucketNotification represents a Bucket Notifications diff --git a/deploy/examples/crds.yaml b/deploy/examples/crds.yaml index 7b3364c42..18dcd0883 100644 --- a/deploy/examples/crds.yaml +++ b/deploy/examples/crds.yaml @@ -898,7 +898,14 @@ spec: singular: cephbucketnotification scope: Namespaced versions: - - name: v1 + - additionalPrinterColumns: + - jsonPath: .status.phase + name: Phase + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 schema: openAPIV3Schema: description: CephBucketNotification represents a Bucket Notifications diff --git a/pkg/apis/ceph.rook.io/v1/types.go b/pkg/apis/ceph.rook.io/v1/types.go index 94bd03d51..3b42cea1f 100755 --- a/pkg/apis/ceph.rook.io/v1/types.go +++ b/pkg/apis/ceph.rook.io/v1/types.go @@ -2616,6 +2616,8 @@ type KafkaEndpointSpec struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // CephBucketNotification represents a Bucket Notifications +// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` // +kubebuilder:subresource:status // +kubebuilder:resource:shortName=cephbn type CephBucketNotification struct {