From 15e9f499269a2a478625cd065f626b312c6750bb Mon Sep 17 00:00:00 2001 From: Arun Kumar Mohan Date: Tue, 30 Jan 2024 19:24:17 +0530 Subject: [PATCH] Add 'managedBy' label to rook-ceph-exporter metrics also Currently we add the 'managedBy' label to ceph metrics, similarly we need to add 'managedBy' label to ceph exporter metrics. Signed-off-by: Arun Kumar Mohan --- controllers/storagecluster/cephcluster.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/controllers/storagecluster/cephcluster.go b/controllers/storagecluster/cephcluster.go index dd5fe5a325..572c0e82ed 100644 --- a/controllers/storagecluster/cephcluster.go +++ b/controllers/storagecluster/cephcluster.go @@ -478,10 +478,11 @@ func newCephCluster(sc *ocsv1.StorageCluster, cephImage string, serverVersion *v ContinueUpgradeAfterChecksEvenIfNotHealthy: sc.Spec.ResourceProfile == sc.Status.LastAppliedResourceProfile, LogCollector: logCollector, Labels: rookCephv1.LabelsSpec{ - rookCephv1.KeyMgr: rookCephv1.Labels{defaults.ODFResourceProfileKey: sc.Spec.ResourceProfile}, - rookCephv1.KeyMon: rookCephv1.Labels{defaults.ODFResourceProfileKey: sc.Spec.ResourceProfile}, - rookCephv1.KeyOSD: rookCephv1.Labels{defaults.ODFResourceProfileKey: sc.Spec.ResourceProfile}, - rookCephv1.KeyMonitoring: getCephClusterMonitoringLabels(*sc), + rookCephv1.KeyMgr: rookCephv1.Labels{defaults.ODFResourceProfileKey: sc.Spec.ResourceProfile}, + rookCephv1.KeyMon: rookCephv1.Labels{defaults.ODFResourceProfileKey: sc.Spec.ResourceProfile}, + rookCephv1.KeyOSD: rookCephv1.Labels{defaults.ODFResourceProfileKey: sc.Spec.ResourceProfile}, + rookCephv1.KeyMonitoring: getCephClusterMonitoringLabels(*sc), + rookCephv1.KeyCephExporter: getCephClusterMonitoringLabels(*sc), }, CSI: rookCephv1.CSIDriverSpec{ ReadAffinity: getReadAffinityOptions(sc), @@ -640,7 +641,8 @@ func newExternalCephCluster(sc *ocsv1.StorageCluster, monitoringIP, monitoringPo Monitoring: monitoringSpec, Network: getNetworkSpec(*sc), Labels: rookCephv1.LabelsSpec{ - rookCephv1.KeyMonitoring: getCephClusterMonitoringLabels(*sc), + rookCephv1.KeyMonitoring: getCephClusterMonitoringLabels(*sc), + rookCephv1.KeyCephExporter: getCephClusterMonitoringLabels(*sc), }, CSI: rookCephv1.CSIDriverSpec{ ReadAffinity: getReadAffinityOptions(sc),