mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
avoid incorrect short-circuit of client-ca setup
This commit is contained in:
parent
093ceb9528
commit
c6c0b8518e
@ -298,7 +298,7 @@ func (s *BuiltInAuthenticationOptions) ToAuthenticationConfig() authenticator.Au
|
||||
}
|
||||
|
||||
func (o *BuiltInAuthenticationOptions) Apply(c *genericapiserver.Config) error {
|
||||
if o == nil || o.PasswordFile == nil {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -316,7 +316,8 @@ func (o *BuiltInAuthenticationOptions) Apply(c *genericapiserver.Config) error {
|
||||
}
|
||||
}
|
||||
|
||||
c.SupportsBasicAuth = len(o.PasswordFile.BasicAuthFile) > 0
|
||||
c.SupportsBasicAuth = o.PasswordFile != nil && len(o.PasswordFile.BasicAuthFile) > 0
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user