avoid incorrect short-circuit of client-ca setup

parent 093ceb95
...@@ -298,7 +298,7 @@ func (s *BuiltInAuthenticationOptions) ToAuthenticationConfig() authenticator.Au ...@@ -298,7 +298,7 @@ func (s *BuiltInAuthenticationOptions) ToAuthenticationConfig() authenticator.Au
} }
func (o *BuiltInAuthenticationOptions) Apply(c *genericapiserver.Config) error { func (o *BuiltInAuthenticationOptions) Apply(c *genericapiserver.Config) error {
if o == nil || o.PasswordFile == nil { if o == nil {
return nil return nil
} }
...@@ -316,7 +316,8 @@ func (o *BuiltInAuthenticationOptions) Apply(c *genericapiserver.Config) error { ...@@ -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 return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment