Skip to content

Commit

Permalink
webhook: make sure auth service gets created properly
Browse files Browse the repository at this point in the history
  • Loading branch information
torresdal committed Feb 28, 2021
1 parent 5ad4093 commit 87cd17d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/azure-keyvault-secrets-webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 87cd17d

Please sign in to comment.