Skip to content

Commit

Permalink
Istio CR must be named default
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-cattermole committed Jan 8, 2024
1 parent 1e67517 commit 86e10d9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions controllers/kuadrant_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ import (

const (
kuadrantFinalizer = "kuadrant.io/finalizer"
// (Sail) The istio CR must be named default to process GW API resources
istioCRName = "default"
)

// KuadrantReconciler reconciles a Kuadrant object
Expand Down Expand Up @@ -332,7 +334,7 @@ func (r *KuadrantReconciler) getIstioConfigObjects(ctx context.Context, logger l
} else {
// Error is NoMatchError so check for Istio CR instead
ist := &istiov1alpha1.Istio{}
istKey := client.ObjectKey{Name: istioCRName()}
istKey := client.ObjectKey{Name: istioCRName}
if err := r.GetResource(ctx, istKey, ist); err != nil {
logger.V(1).Info("failed to get istio object", "key", istKey, "err", err)
if apimeta.IsNoMatchError(err) {
Expand Down Expand Up @@ -381,10 +383,6 @@ func controlPlaneProviderName() string {
return env.GetString("ISTIOOPERATOR_NAME", "istiocontrolplane")
}

func istioCRName() string {
return env.GetString("ISTIO_NAME", "default")
}

func controlPlaneConfigMapName() string {
return env.GetString("ISTIOCONFIGMAP_NAME", "istio")
}
Expand Down

0 comments on commit 86e10d9

Please sign in to comment.