Simplify condition

Co-Authored-By: John Gardiner Myers <jgmyers@proofpoint.com>
This commit is contained in:
Ciprian Hacman 2020-04-05 20:57:09 +03:00 committed by GitHub
parent ad8e1ceff7
commit fa516ed5f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -297,7 +297,7 @@ func (b *KubeAPIServerBuilder) buildPod() (*v1.Pod, error) {
// Support for basic auth was deprecated 1.16 and removed in 1.19
// https://github.com/kubernetes/kubernetes/pull/89069
if b.IsKubernetesLT("1.18") {
if (kubeAPIServer.DisableBasicAuth != nil && !*kubeAPIServer.DisableBasicAuth) || kubeAPIServer.DisableBasicAuth == nil {
if kubeAPIServer.DisableBasicAuth == nil || !*kubeAPIServer.DisableBasicAuth {
kubeAPIServer.BasicAuthFile = filepath.Join(b.PathSrvKubernetes(), "basic_auth.csv")
}
} else if b.IsKubernetesLT("1.19") {