From e1fd23933f955dd1c789c33c3e3ac0d18a9237c6 Mon Sep 17 00:00:00 2001 From: shenjiatong Date: Sun, 25 Apr 2021 10:16:11 +0800 Subject: [PATCH] ceph: add phase to cephfilesystems crd add a Phase to columns that should be printed Signed-off-by: shenjiatong --- cluster/charts/rook-ceph/templates/resources.yaml | 3 +++ cluster/examples/kubernetes/ceph/crds.yaml | 3 +++ pkg/apis/ceph.rook.io/v1/types.go | 1 + 3 files changed, 7 insertions(+) diff --git a/cluster/charts/rook-ceph/templates/resources.yaml b/cluster/charts/rook-ceph/templates/resources.yaml index e3c408a8a..b56a11dfc 100644 --- a/cluster/charts/rook-ceph/templates/resources.yaml +++ b/cluster/charts/rook-ceph/templates/resources.yaml @@ -4831,6 +4831,9 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date + - jsonPath: .status.phase + name: Phase + type: string name: v1 schema: openAPIV3Schema: diff --git a/cluster/examples/kubernetes/ceph/crds.yaml b/cluster/examples/kubernetes/ceph/crds.yaml index ae9d3d13b..809e6cc6e 100644 --- a/cluster/examples/kubernetes/ceph/crds.yaml +++ b/cluster/examples/kubernetes/ceph/crds.yaml @@ -4829,6 +4829,9 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date + - jsonPath: .status.phase + name: Phase + 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 0500bc9d1..2471cb2d9 100755 --- a/pkg/apis/ceph.rook.io/v1/types.go +++ b/pkg/apis/ceph.rook.io/v1/types.go @@ -886,6 +886,7 @@ type ErasureCodedSpec struct { // CephFilesystem represents a Ceph Filesystem // +kubebuilder:printcolumn:name="ActiveMDS",type=string,JSONPath=`.spec.metadataServer.activeCount`,description="Number of desired active MDS daemons" // +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` // +kubebuilder:subresource:status type CephFilesystem struct { metav1.TypeMeta `json:",inline"`