mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-25 04:11:46 +00:00
cloudprovider: add instance id to NodeSpec
Sometimes for external applications it is important to identify the cloud instance of the nodes. Until this patch there was no contract that the node name returned by List was also the unique identifier of the cloud instance. This new API ensures that an external application can reliably retrieve the relevant instance id of the nodes. Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
This commit is contained in:
@@ -363,6 +363,11 @@ func (i *Instances) IPAddress(name string) (net.IP, error) {
|
||||
return net.ParseIP(ip), err
|
||||
}
|
||||
|
||||
// ExternalID returns the cloud provider ID of the specified instance.
|
||||
func (i *Instances) ExternalID(name string) (string, error) {
|
||||
return "", fmt.Errorf("unimplemented")
|
||||
}
|
||||
|
||||
func (i *Instances) GetNodeResources(name string) (*api.NodeResources, error) {
|
||||
glog.V(2).Infof("GetNodeResources(%v) called", name)
|
||||
|
||||
|
Reference in New Issue
Block a user