Merge pull request #8018 from sharifelgamal/nodeip

assign proper internal IPs for nodes
pull/8023/head
Medya Ghazizadeh 2020-05-06 20:55:28 +00:00 committed by GitHub
commit 4607c0f04a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -54,12 +54,8 @@ func extraKubeletOpts(mc config.ClusterConfig, nc config.Node, r cruntime.Manage
if k8s.NetworkPlugin != "" {
extraOpts["network-plugin"] = k8s.NetworkPlugin
}
cp, err := config.PrimaryControlPlane(&mc)
if err != nil {
return nil, errors.Wrap(err, "getting master node")
}
if _, ok := extraOpts["node-ip"]; !ok {
extraOpts["node-ip"] = cp.IP
extraOpts["node-ip"] = nc.IP
}
if _, ok := extraOpts["hostname-override"]; !ok {
nodeName := KubeNodeName(mc, nc)