From d07feea2230e7fdaca98e7f4890e048f2bf4ccca Mon Sep 17 00:00:00 2001 From: parth-gr Date: Mon, 7 Mar 2022 20:13:04 +0530 Subject: [PATCH] core: sync ceph fsid on cephcluster status FSID will be updated with cephcluster CR status when monitoring check get start Signed-off-by: parth-gr (cherry picked from commit 2e89ff0fd92a30ced9fcc4deee13be3fea495d5b) --- deploy/charts/rook-ceph/templates/resources.yaml | 2 ++ deploy/examples/crds.yaml | 2 ++ pkg/apis/ceph.rook.io/v1/types.go | 1 + pkg/operator/ceph/cluster/cephstatus.go | 3 +++ 4 files changed, 8 insertions(+) diff --git a/deploy/charts/rook-ceph/templates/resources.yaml b/deploy/charts/rook-ceph/templates/resources.yaml index 47abde000..fd4050096 100644 --- a/deploy/charts/rook-ceph/templates/resources.yaml +++ b/deploy/charts/rook-ceph/templates/resources.yaml @@ -4119,6 +4119,8 @@ spec: - severity type: object type: object + fsid: + type: string health: type: string lastChanged: diff --git a/deploy/examples/crds.yaml b/deploy/examples/crds.yaml index 745411e4c..234fa23bf 100644 --- a/deploy/examples/crds.yaml +++ b/deploy/examples/crds.yaml @@ -4118,6 +4118,8 @@ spec: - severity type: object type: object + fsid: + type: string health: type: string lastChanged: diff --git a/pkg/apis/ceph.rook.io/v1/types.go b/pkg/apis/ceph.rook.io/v1/types.go index aa26b0642..14e194536 100755 --- a/pkg/apis/ceph.rook.io/v1/types.go +++ b/pkg/apis/ceph.rook.io/v1/types.go @@ -355,6 +355,7 @@ type CephStatus struct { Capacity Capacity `json:"capacity,omitempty"` // +optional Versions *CephDaemonsVersions `json:"versions,omitempty"` + FSID string `json:"fsid,omitempty"` } // Capacity is the capacity information of a Ceph Cluster diff --git a/pkg/operator/ceph/cluster/cephstatus.go b/pkg/operator/ceph/cluster/cephstatus.go index 40a8132e4..6cb190121 100644 --- a/pkg/operator/ceph/cluster/cephstatus.go +++ b/pkg/operator/ceph/cluster/cephstatus.go @@ -233,6 +233,9 @@ func toCustomResourceStatus(currentStatus cephv1.ClusterStatus, newStatus *cephc s.Capacity = currentStatus.CephStatus.Capacity } } + // update fsid on cephcluster Status + s.FSID = newStatus.FSID + return s }