Export agent.NetworkName for Windows

Was made private in 4aca21a1f1 as there was no comment as to why it was exported.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/6036/head
Brad Davidson 2022-08-23 21:17:40 +00:00 committed by Brad Davidson
parent 3e394f8ec5
commit 7d6982d1fa
1 changed files with 4 additions and 2 deletions

View File

@ -17,9 +17,11 @@ import (
"k8s.io/kubernetes/pkg/kubeapiserver/authorizer/modes" "k8s.io/kubernetes/pkg/kubeapiserver/authorizer/modes"
) )
// NetworkName may be overridden at runtime in downstream projects
var NetworkName = "vxlan0"
const ( const (
socketPrefix = "npipe://" socketPrefix = "npipe://"
networkName = "vxlan0"
) )
func kubeProxyArgs(cfg *config.Agent) map[string]string { func kubeProxyArgs(cfg *config.Agent) map[string]string {
@ -38,7 +40,7 @@ func kubeProxyArgs(cfg *config.Agent) map[string]string {
argsMap["hostname-override"] = cfg.NodeName argsMap["hostname-override"] = cfg.NodeName
} }
if sourceVip := waitForManagementIP(networkName); sourceVip != "" { if sourceVip := waitForManagementIP(NetworkName); sourceVip != "" {
argsMap["source-vip"] = sourceVip argsMap["source-vip"] = sourceVip
} }