Skip to content

Commit

Permalink
configure authorino in the namespace of the kuadrant CR
Browse files Browse the repository at this point in the history
  • Loading branch information
eguzki committed May 25, 2022
1 parent afa846c commit 8d58147
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/kuadrant_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func (r *KuadrantReconciler) unregisterExternalAuthorizer(ctx context.Context) e
return nil
}

func (r *KuadrantReconciler) registerExternalAuthorizer(ctx context.Context) error {
func (r *KuadrantReconciler) registerExternalAuthorizer(ctx context.Context, kObj *kuadrantv1beta1.Kuadrant) error {
logger := logr.FromContext(ctx)
iop := &iopv1alpha1.IstioOperator{}

Expand Down Expand Up @@ -250,7 +250,7 @@ func (r *KuadrantReconciler) registerExternalAuthorizer(ctx context.Context) err

envoyExtAuthzGrpc := make(map[string]interface{})
envoyExtAuthzGrpc["port"] = 50051
envoyExtAuthzGrpc["service"] = "authorino-authorino-authorization.kuadrant-system.svc.cluster.local"
envoyExtAuthzGrpc["service"] = fmt.Sprintf("authorino-authorino-authorization.%s.svc.cluster.local", kObj.Namespace)

kuadrantExtensionProvider := make(map[string]interface{})
kuadrantExtensionProvider["name"] = extAuthorizerName
Expand All @@ -266,7 +266,7 @@ func (r *KuadrantReconciler) registerExternalAuthorizer(ctx context.Context) err
}

func (r *KuadrantReconciler) reconcileSpec(ctx context.Context, kObj *kuadrantv1beta1.Kuadrant) (ctrl.Result, error) {
if err := r.registerExternalAuthorizer(ctx); err != nil {
if err := r.registerExternalAuthorizer(ctx, kObj); err != nil {
return ctrl.Result{}, err
}

Expand Down

0 comments on commit 8d58147

Please sign in to comment.