From 35be9ce5dd91aa8b410bdd4143b70931bbf3cccb Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Fri, 26 Sep 2025 09:27:15 -0700 Subject: [PATCH] core: add PHASE column to cephor The current behavior does not print the PHASE column, as most other CRDs do. E.g.: ``` ~ $ k get cephor lfa NAME AGE lfa 45d ``` Signed-off-by: Joshua Hoblitt (cherry picked from commit 6d9c88425980ecbfabf739712afb522cdf6c792b) --- 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..2b19b631c 100644 --- a/deploy/charts/rook-ceph/templates/resources.yaml +++ b/deploy/charts/rook-ceph/templates/resources.yaml @@ -11400,7 +11400,14 @@ spec: singular: cephobjectrealm 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: CephObjectRealm represents a Ceph Object Store Gateway Realm diff --git a/deploy/examples/crds.yaml b/deploy/examples/crds.yaml index 7b3364c42..c91e58651 100644 --- a/deploy/examples/crds.yaml +++ b/deploy/examples/crds.yaml @@ -11392,7 +11392,14 @@ spec: singular: cephobjectrealm 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: CephObjectRealm represents a Ceph Object Store Gateway Realm diff --git a/pkg/apis/ceph.rook.io/v1/types.go b/pkg/apis/ceph.rook.io/v1/types.go index 94bd03d51..e82951878 100755 --- a/pkg/apis/ceph.rook.io/v1/types.go +++ b/pkg/apis/ceph.rook.io/v1/types.go @@ -2345,6 +2345,8 @@ type ObjectUserKey struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // CephObjectRealm represents a Ceph Object Store Gateway Realm +// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` // +kubebuilder:subresource:status // +kubebuilder:resource:shortName=cephor type CephObjectRealm struct {