diff --git a/operators/multiclusterobservability/pkg/servicemonitor/sm_controller.go b/operators/multiclusterobservability/pkg/servicemonitor/sm_controller.go index ebf1f90457..a6c9dc0751 100644 --- a/operators/multiclusterobservability/pkg/servicemonitor/sm_controller.go +++ b/operators/multiclusterobservability/pkg/servicemonitor/sm_controller.go @@ -22,21 +22,21 @@ import ( ) const ( - ocpMonitoringNamespace = "open-cluster-management-observability" - metricsNamePrefix = "acm_" + metricsNamePrefix = "acm_" ) var ( + ocpMonitoringNamespace = config.GetDefaultNamespace() log = logf.Log.WithName("sm_controller") - isSmControllerRunnning = false + isSmControllerRunning = false ) func Start() { - if isSmControllerRunnning { + if isSmControllerRunning { return } - isSmControllerRunnning = true + isSmControllerRunning = true promClient, err := promclientset.NewForConfig(ctrl.GetConfigOrDie()) if err != nil {