From 666200ead93af2f3bdc597e5aa5534ce00026ca1 Mon Sep 17 00:00:00 2001 From: Haim Kortovich Date: Wed, 8 May 2024 16:55:23 -0500 Subject: [PATCH] Try fix issuer [ZITADOPER-1] --- src/internal/controller/zitadelcluster_controller.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/internal/controller/zitadelcluster_controller.go b/src/internal/controller/zitadelcluster_controller.go index 758b757..acc08d3 100644 --- a/src/internal/controller/zitadelcluster_controller.go +++ b/src/internal/controller/zitadelcluster_controller.go @@ -362,7 +362,7 @@ func (r *ZitadelClusterReconciler) reconcileDefaultInstance(ctx context.Context, } ztdClient, err := system.NewClient(GetIssuer(zitadel), GetAPI(zitadel), system.JWTProfileFromKey([]byte(privateKeyData), masterkey.OwnerName), system.WithInsecure()) if err != nil { - return ctrl.Result{}, err + return ctrl.Result{}, fmt.Errorf("Error creating sytem client: %v", err) } defer ztdClient.Connection.Close() @@ -426,11 +426,7 @@ func (r *ZitadelClusterReconciler) reconcileDefaultInstance(ctx context.Context, } func GetIssuer(zitadel *zitadelv1alpha1.ZitadelCluster) string { - scheme := "http" - if zitadel.Spec.ExternalSecure { - scheme = "https" - } - return fmt.Sprintf("%s://%s:%d", scheme, zitadel.Spec.Host, zitadel.Spec.ExternalPort) + return "k8s-operator" } func GetAPI(zitadel *zitadelv1alpha1.ZitadelCluster) string {