mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Add v1.NodeLegacyHostIP to be consistent with the internal API;
Mark NodeLegacyHostIP will be deprecated in 1.7; Let cloudprovider that used to only set NodeLegacyHostIP set the IP as both InternalIP and ExternalIP, to allow dprecation in 1.7
This commit is contained in:
@@ -290,5 +290,9 @@ func (c *MesosCloud) NodeAddresses(nodeName types.NodeName) ([]api.NodeAddress,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return []api.NodeAddress{{Type: api.NodeLegacyHostIP, Address: ip.String()}}, nil
|
||||
return []api.NodeAddress{
|
||||
{Type: api.NodeLegacyHostIP, Address: ip.String()},
|
||||
{Type: api.NodeInternalIP, Address: ip.String()},
|
||||
{Type: api.NodeExternalIP, Address: ip.String()},
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -173,7 +173,11 @@ func (v *OVirtCloud) NodeAddresses(nodeName types.NodeName) ([]api.NodeAddress,
|
||||
address = resolved[0]
|
||||
}
|
||||
|
||||
return []api.NodeAddress{{Type: api.NodeLegacyHostIP, Address: address.String()}}, nil
|
||||
return []api.NodeAddress{
|
||||
{Type: api.NodeLegacyHostIP, Address: address.String()},
|
||||
{Type: api.NodeInternalIP, Address: address.String()},
|
||||
{Type: api.NodeExternalIP, Address: address.String()},
|
||||
}, nil
|
||||
}
|
||||
|
||||
// mapNodeNameToInstanceName maps from a k8s NodeName to an ovirt instance name (the hostname)
|
||||
|
||||
@@ -408,7 +408,12 @@ func (i *Instances) NodeAddresses(nodeName types.NodeName) ([]api.NodeAddress, e
|
||||
glog.V(2).Infof("NodeAddresses(%v) => %v", serverName, ip)
|
||||
|
||||
// net.ParseIP().String() is to maintain compatibility with the old code
|
||||
return []api.NodeAddress{{Type: api.NodeLegacyHostIP, Address: net.ParseIP(ip).String()}}, nil
|
||||
parsedIP := net.ParseIP(ip).String()
|
||||
return []api.NodeAddress{
|
||||
{Type: api.NodeLegacyHostIP, Address: parsedIP},
|
||||
{Type: api.NodeInternalIP, Address: parsedIP},
|
||||
{Type: api.NodeExternalIP, Address: parsedIP},
|
||||
}, nil
|
||||
}
|
||||
|
||||
// mapNodeNameToServerName maps from a k8s NodeName to a rackspace Server Name
|
||||
|
||||
Reference in New Issue
Block a user