Skip to content

Commit

Permalink
allow observability with global hub
Browse files Browse the repository at this point in the history
Signed-off-by: Coleen Iona Quadros <[email protected]>
  • Loading branch information
coleenquadros committed Jul 31, 2024
1 parent 75cb1c2 commit 16c5e81
Showing 1 changed file with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 16c5e81

Please sign in to comment.