mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-10-30 17:58:14 +00:00
fix npe in serviceAccount flow
This commit is contained in:
@@ -138,7 +138,7 @@ func (config Config) New(serverLifecycle context.Context) (authenticator.Request
|
||||
}
|
||||
tokenAuthenticators = append(tokenAuthenticators, serviceAccountAuth)
|
||||
}
|
||||
if len(config.ServiceAccountIssuers) > 0 {
|
||||
if len(config.ServiceAccountIssuers) > 0 && config.ServiceAccountPublicKeysGetter != nil {
|
||||
serviceAccountAuth, err := newServiceAccountAuthenticator(config.ServiceAccountIssuers, config.ServiceAccountPublicKeysGetter, config.APIAudiences, config.ServiceAccountTokenGetter)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, err
|
||||
|
||||
Reference in New Issue
Block a user