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

This reverts commit aa9065749c.

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: Brad Davidson <brad.davidson@rancher.com>
pull/5644/head v1.24.1-rc3+k3s1
Brad Davidson 3 years ago committed by Brad Davidson
parent 29397b4e68
commit 491aa11e10

@ -121,11 +121,9 @@ func kubeletArgs(cfg *config.Agent) map[string]string {
if cfg.NodeName != "" {
argsMap["hostname-override"] = cfg.NodeName
}
if nodeIPs := util.JoinIPs(cfg.NodeIPs); nodeIPs != "" {
defaultIP, err := net.ChooseHostInterface()
if err != nil || defaultIP.String() != nodeIPs {
argsMap["node-ip"] = nodeIPs
}
defaultIP, err := net.ChooseHostInterface()
if err != nil || defaultIP.String() != cfg.NodeIP {
argsMap["node-ip"] = cfg.NodeIP
}
kubeletRoot, runtimeRoot, controllers := cgroups.CheckCgroups()
if !controllers["cpu"] {

Loading…
Cancel
Save