Merge pull request #99387 from KofClubs/optimize-getProxyMode-kube-proxy

Optimized function getProxyMode
This commit is contained in:
Kubernetes Prow Robot 2021-02-26 11:32:28 -08:00 committed by GitHub
commit 601a584b52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -179,9 +179,7 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi
}
func getProxyMode(proxyMode string, kcompat winkernel.KernelCompatTester) string {
if proxyMode == proxyModeUserspace {
return proxyModeUserspace
} else if proxyMode == proxyModeKernelspace {
if proxyMode == proxyModeKernelspace {
return tryWinKernelSpaceProxy(kcompat)
}
return proxyModeUserspace