From 5ee982f1e1549c6aa7c89e609df49c53439cb440 Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Fri, 26 Sep 2025 09:39:32 -0700 Subject: [PATCH] core: add PHASE column to cephnfs The current behavior does not print the PHASE column, as most other CRDs do. E.g.: ``` ~ $ k get cephnfs nfs1 NAME AGE nfs1 45d ``` Signed-off-by: Joshua Hoblitt --- 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 7b7a03ada..98a94d316 100644 --- a/deploy/charts/rook-ceph/templates/resources.yaml +++ b/deploy/charts/rook-ceph/templates/resources.yaml @@ -9380,7 +9380,14 @@ spec: singular: cephnfs 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: CephNFS represents a Ceph NFS diff --git a/deploy/examples/crds.yaml b/deploy/examples/crds.yaml index 5e4e3b937..c661b8f20 100644 --- a/deploy/examples/crds.yaml +++ b/deploy/examples/crds.yaml @@ -9373,7 +9373,14 @@ spec: singular: cephnfs 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: CephNFS represents a Ceph NFS diff --git a/pkg/apis/ceph.rook.io/v1/types.go b/pkg/apis/ceph.rook.io/v1/types.go index 94bd03d51..6b16a974e 100755 --- a/pkg/apis/ceph.rook.io/v1/types.go +++ b/pkg/apis/ceph.rook.io/v1/types.go @@ -2697,6 +2697,8 @@ type RGWServiceSpec struct { // CephNFS represents a Ceph NFS // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` // +kubebuilder:subresource:status type CephNFS struct { metav1.TypeMeta `json:",inline"`