Merge pull request #100920 from navist2020/fix/Yoda

Don't use Yoda conditions
This commit is contained in:
Kubernetes Prow Robot 2021-04-22 13:18:31 -07:00 committed by GitHub
commit 13e9c24db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -225,7 +225,7 @@ HTTP server: The kubelet can also listen for HTTP and respond to a simple API
os.Exit(1) os.Exit(1)
} }
if (kubeletConfig.KubeletCgroups != "" && kubeletConfig.KubeReservedCgroup != "") && (0 != strings.Index(kubeletConfig.KubeletCgroups, kubeletConfig.KubeReservedCgroup)) { if (kubeletConfig.KubeletCgroups != "" && kubeletConfig.KubeReservedCgroup != "") && (strings.Index(kubeletConfig.KubeletCgroups, kubeletConfig.KubeReservedCgroup) != 0) {
klog.InfoS("unsupported configuration:KubeletCgroups is not within KubeReservedCgroup") klog.InfoS("unsupported configuration:KubeletCgroups is not within KubeReservedCgroup")
} }