ceph: do not configure external metric endpoint is not present
If no endpoint are configured let's simply return. Closes: https://github.com/rook/rook/issues/7963 Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
1 parent
2a9c81ec55
commit
db91fd8bc3
1 file changed
+5
@@ -668,6 +668,11 @@ func createExternalMetricsEndpoints(namespace string, monitoringSpec cephv1.Moni
|
||||
}
|
||||
|
||||
func ConfigureExternalMetricsEndpoint(ctx *clusterd.Context, monitoringSpec cephv1.MonitoringSpec, clusterInfo *client.ClusterInfo, ownerInfo *k8sutil.OwnerInfo) error {
|
||||
if len(monitoringSpec.ExternalMgrEndpoints) == 0 {
|
||||
logger.Debug("no metric endpoint configured, doing nothing")
|
||||
return nil
|
||||
}
|
||||
|
||||
// Get active mgr
|
||||
var activeMgrAddr string
|
||||
// We use mgr dump and not stat because we want the IP address
|
||||
|
||||
Reference in new issue
Block a user