Commit 491aa11e authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

Revert "Give kubelet the node-ip value (#5579)"

This reverts commit aa906574. Setting dual-stack node-ip does not work when --cloud-provider is set to anything, including 'external'. Just set node-ip to the first IP, and let the cloud provider add the other address. Signed-off-by: 's avatarBrad Davidson <brad.davidson@rancher.com>
parent 29397b4e
...@@ -121,11 +121,9 @@ func kubeletArgs(cfg *config.Agent) map[string]string { ...@@ -121,11 +121,9 @@ func kubeletArgs(cfg *config.Agent) map[string]string {
if cfg.NodeName != "" { if cfg.NodeName != "" {
argsMap["hostname-override"] = cfg.NodeName argsMap["hostname-override"] = cfg.NodeName
} }
if nodeIPs := util.JoinIPs(cfg.NodeIPs); nodeIPs != "" { defaultIP, err := net.ChooseHostInterface()
defaultIP, err := net.ChooseHostInterface() if err != nil || defaultIP.String() != cfg.NodeIP {
if err != nil || defaultIP.String() != nodeIPs { argsMap["node-ip"] = cfg.NodeIP
argsMap["node-ip"] = nodeIPs
}
} }
kubeletRoot, runtimeRoot, controllers := cgroups.CheckCgroups() kubeletRoot, runtimeRoot, controllers := cgroups.CheckCgroups()
if !controllers["cpu"] { if !controllers["cpu"] {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment