From 87cd17dc66a8fa8fc7b71e02a9823089b25943c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Arild=20T=C3=B8rresdal?= Date: Sun, 28 Feb 2021 23:05:22 +0100 Subject: [PATCH] webhook: make sure auth service gets created properly --- cmd/azure-keyvault-secrets-webhook/main.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmd/azure-keyvault-secrets-webhook/main.go b/cmd/azure-keyvault-secrets-webhook/main.go index 38376fed..e20c88ab 100644 --- a/cmd/azure-keyvault-secrets-webhook/main.go +++ b/cmd/azure-keyvault-secrets-webhook/main.go @@ -294,8 +294,6 @@ func main() { os.Exit(1) } - var authService *auth.AuthService - if config.useAuthService { config.credentials, config.credentialProvider, err = getCredentials() if err != nil { @@ -328,8 +326,8 @@ func main() { config.registry = registry.NewRegistry(config.cloudConfig) - createHTTPEndpoint(wg, config.httpPort, config.useAuthService, authService) - createMTLSEndpoint(wg, config.mtlsPort, config.useAuthService, authService) + createHTTPEndpoint(wg, config.httpPort, config.useAuthService, config.authService) + createMTLSEndpoint(wg, config.mtlsPort, config.useAuthService, config.authService) createTLSEndpoint(wg, config.tlsPort, config.tlsCertFile, config.tlsKeyFile) wg.Wait()