Don't use Yoda conditions

This commit is contained in:
navist2020 2021-04-08 18:14:45 +08:00
parent 11f95dc047
commit 4f7d87f72c

View File

@ -225,7 +225,7 @@ HTTP server: The kubelet can also listen for HTTP and respond to a simple API
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")
}