From 8a574a0c47680635a95ad95c6646cf5124ae2d9a Mon Sep 17 00:00:00 2001 From: tomjo Date: Thu, 12 Oct 2023 17:34:32 +0200 Subject: [PATCH] feat: TLS authentication --- pkg/admin/interface.go | 1 - pkg/connection/reconciler.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/admin/interface.go b/pkg/admin/interface.go index 8536b5dd..371ebddf 100644 --- a/pkg/admin/interface.go +++ b/pkg/admin/interface.go @@ -235,7 +235,6 @@ func NewPulsarAdmin(conf PulsarAdminConfig) (PulsarAdmin, error) { if err != nil { return nil, err } - adminClient = admin.NewWithAuthProvider(config, oauthProvider) } else if conf.Token != "" { config.Token = conf.Token diff --git a/pkg/connection/reconciler.go b/pkg/connection/reconciler.go index 5ae809b7..bde17fc5 100644 --- a/pkg/connection/reconciler.go +++ b/pkg/connection/reconciler.go @@ -197,7 +197,7 @@ func (r *PulsarConnectionReconciler) MakePulsarAdminConfig(ctx context.Context) } // MakePulsarAdminConfig create pulsar admin configuration -func (r *PulsarConnectionReconciler) MakePulsarAdminConfig(ctx context.Context, connection *resourcev1alpha1.PulsarConnection, +func MakePulsarAdminConfig(ctx context.Context, connection *resourcev1alpha1.PulsarConnection, k8sClient client.Client) (*admin.PulsarAdminConfig, error) { if connection.Spec.AdminServiceURL == "" && connection.Spec.AdminServiceSecureURL == "" { return nil, fmt.Errorf("adminServiceURL or adminServiceSecureURL must not be empty")