From df95c1add01311184aafd2e52c81d8d14093f59a Mon Sep 17 00:00:00 2001 From: xiaobaowen Date: Thu, 9 Mar 2023 15:35:04 +0800 Subject: [PATCH] core: add fsid to the additionalPrinterColumns on cephcluster custom resource Signed-off-by: xiaobaowen --- deploy/charts/rook-ceph/templates/resources.yaml | 4 ++++ deploy/examples/crds.yaml | 4 ++++ pkg/apis/ceph.rook.io/v1/types.go | 1 + 3 files changed, 9 insertions(+) diff --git a/deploy/charts/rook-ceph/templates/resources.yaml b/deploy/charts/rook-ceph/templates/resources.yaml index c55f997f1..72dd27a02 100644 --- a/deploy/charts/rook-ceph/templates/resources.yaml +++ b/deploy/charts/rook-ceph/templates/resources.yaml @@ -865,6 +865,10 @@ spec: - jsonPath: .spec.external.enable name: External type: boolean + - description: Ceph FSID + jsonPath: .status.ceph.fsid + name: FSID + type: string name: v1 schema: openAPIV3Schema: diff --git a/deploy/examples/crds.yaml b/deploy/examples/crds.yaml index 6493db113..84837caf6 100644 --- a/deploy/examples/crds.yaml +++ b/deploy/examples/crds.yaml @@ -863,6 +863,10 @@ spec: - jsonPath: .spec.external.enable name: External type: boolean + - description: Ceph FSID + jsonPath: .status.ceph.fsid + name: FSID + type: string name: v1 schema: openAPIV3Schema: diff --git a/pkg/apis/ceph.rook.io/v1/types.go b/pkg/apis/ceph.rook.io/v1/types.go index f80c01cfe..3790106b7 100755 --- a/pkg/apis/ceph.rook.io/v1/types.go +++ b/pkg/apis/ceph.rook.io/v1/types.go @@ -42,6 +42,7 @@ import ( // +kubebuilder:printcolumn:name="Message",type=string,JSONPath=`.status.message`,description="Message" // +kubebuilder:printcolumn:name="Health",type=string,JSONPath=`.status.ceph.health`,description="Ceph Health" // +kubebuilder:printcolumn:name="External",type=boolean,JSONPath=`.spec.external.enable` +// +kubebuilder:printcolumn:name="FSID",type=string,JSONPath=`.status.ceph.fsid`,description="Ceph FSID" // +kubebuilder:subresource:status type CephCluster struct { metav1.TypeMeta `json:",inline"`