Commit 8974b4f0 authored by Kashif Saadat's avatar Kashif Saadat

Don't log a warning to override hostname if there's no change.

parent 9f75e034
...@@ -139,7 +139,7 @@ func NodeAddress(nodeIP net.IP, // typically Kubelet.nodeIP ...@@ -139,7 +139,7 @@ func NodeAddress(nodeIP net.IP, // typically Kubelet.nodeIP
// no existing Hostname address found, add it // no existing Hostname address found, add it
klog.Warningf("adding overridden hostname of %v to cloudprovider-reported addresses", hostname) klog.Warningf("adding overridden hostname of %v to cloudprovider-reported addresses", hostname)
nodeAddresses = append(nodeAddresses, v1.NodeAddress{Type: v1.NodeHostName, Address: hostname}) nodeAddresses = append(nodeAddresses, v1.NodeAddress{Type: v1.NodeHostName, Address: hostname})
} else { } else if existingHostnameAddress.Address != hostname {
// override the Hostname address reported by the cloud provider // override the Hostname address reported by the cloud provider
klog.Warningf("replacing cloudprovider-reported hostname of %v with overridden hostname of %v", existingHostnameAddress.Address, hostname) klog.Warningf("replacing cloudprovider-reported hostname of %v with overridden hostname of %v", existingHostnameAddress.Address, hostname)
existingHostnameAddress.Address = hostname existingHostnameAddress.Address = hostname
......
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