Skip to content

Commit

Permalink
fix cluster scoped istio CR (Kuadrant#391)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Cattermole <[email protected]>
  • Loading branch information
eguzki and adam-cattermole committed Jan 30, 2024
1 parent 08aba7e commit 6f029d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions config/dependencies/istio/sail/istio.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
apiVersion: operator.istio.io/v1alpha1
kind: Istio
metadata:
name: istiocontrolplane
namespace: istio-system
name: default
spec:
version: v1.20.0
namespace: istio-system
Expand Down
3 changes: 3 additions & 0 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,6 +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}
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

0 comments on commit 6f029d1

Please sign in to comment.