From 3bbb67dae87597d629a486d44e0ab8d83eef4126 Mon Sep 17 00:00:00 2001 From: Coleen Iona Quadros Date: Mon, 22 Jul 2024 18:31:10 +0200 Subject: [PATCH] allow observability with global hub Signed-off-by: Coleen Iona Quadros --- .../multiclusterobservability_controller.go | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/operators/multiclusterobservability/controllers/multiclusterobservability/multiclusterobservability_controller.go b/operators/multiclusterobservability/controllers/multiclusterobservability/multiclusterobservability_controller.go index 04648beea1..546518b59b 100644 --- a/operators/multiclusterobservability/controllers/multiclusterobservability/multiclusterobservability_controller.go +++ b/operators/multiclusterobservability/controllers/multiclusterobservability/multiclusterobservability_controller.go @@ -52,7 +52,6 @@ import ( "github.com/stolostron/multicluster-observability-operator/operators/multiclusterobservability/pkg/util" "github.com/stolostron/multicluster-observability-operator/operators/pkg/deploying" commonutil "github.com/stolostron/multicluster-observability-operator/operators/pkg/util" - operatorsutil "github.com/stolostron/multicluster-observability-operator/operators/pkg/util" ) const ( @@ -151,19 +150,19 @@ func (r *MultiClusterObservabilityReconciler) Reconcile(ctx context.Context, req StartStatusUpdate(r.Client, instance) if _, ok := os.LookupEnv("UNIT_TEST"); !ok { - crdClient, err := operatorsutil.GetOrCreateCRDClient() - if err != nil { - return ctrl.Result{}, err - } - mcghCrdExists, err := operatorsutil.CheckCRDExist(crdClient, config.MCGHCrdName) - if err != nil { - return ctrl.Result{}, err - } - if mcghCrdExists { - // Do not start the MCO if the MCGH CRD exists - reqLogger.Info("MCGH CRD exists, Observability is not supported") - return ctrl.Result{}, nil - } + //crdClient, err := operatorsutil.GetOrCreateCRDClient() + //if err != nil { + // return ctrl.Result{}, err + //} + //mcghCrdExists, err := operatorsutil.CheckCRDExist(crdClient, config.MCGHCrdName) + //if err != nil { + // return ctrl.Result{}, err + //} + //if mcghCrdExists { + // // Do not start the MCO if the MCGH CRD exists + // reqLogger.Info("MCGH CRD exists, Observability is not supported") + // return ctrl.Result{}, nil + //} } ingressCtlCrdExists := r.CRDMap[config.IngressControllerCRD]