func (i *InstancesController) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloudprovider.InstanceMetadata, error) {
	klog.Infof("InstanceMetadata: node %q", node.GetName())
	machine, err := metal.GetMachineFromNode(i.client, types.NodeName(node.Name))
	if err != nil {
		return nil, err
	}

	if machine == nil {
		return nil, fmt.Errorf("machine is nil for node:%s", node.Name)
	}
	nas, err := nodeAddresses(machine, i.defaultExternalNetwork)
	if err != nil {
		return nil, err
	}
	md := &cloudprovider.InstanceMetadata{
		InstanceType:  *machine.Size.ID,
		ProviderID:    fmt.Sprintf("metal://%s/%s", *machine.Partition.ID, *machine.ID),
		NodeAddresses: nas,
	}
	return md, nil
}
// InstanceMetadata contains metadata about a specific instance.
// Values returned in InstanceMetadata are translated into specific fields and labels for Node.
//
// ProviderID is a unique ID used to identify an instance on the cloud provider.
// The ProviderID set here will be set on the node's spec.providerID field.
// The provider ID format can be set by the cloud provider but providers should
// ensure the format does not change in any incompatible way.
//
// The provider ID format used by existing cloud provider has been:
//    <provider-name>://<instance-id>
// Existing providers setting this field should preserve the existing format
// currently being set in node.spec.providerID.
InstanceMetadata contains metadata about a specific instance.
Values returned in InstanceMetadata are translated into specific fields and labels for Node.

ProviderID is a unique ID used to identify an instance on the cloud provider.
The ProviderID set here will be set on the node's spec.providerID field.
The provider ID format can be set by the cloud provider but providers should
ensure the format does not change in any incompatible way.

The provider ID format used by existing cloud provider has been:
://
Existing providers setting this field should preserve the existing format
currently being set in node.spec.providerID.
// InstanceMetadata contains metadata about a specific instance . // Values returned in InstanceMetadata are translated into specific fields and labels for Node . // // ProviderID is a unique ID used to identify an instance on the cloud provider . // The ProviderID set here will be set on the node ' s spec . providerID field . // The provider ID format can be set by the cloud provider but providers should // ensure the format does not change in any incompatible way . // // The provider ID format used by existing cloud provider has been : // <provider - name > : // <instance - id > // Existing providers setting this field should preserve the existing format // currently being set in node . spec . providerID .
func (i *InstancesController) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloudprovider.InstanceMetadata, error) {
	klog.Infof("InstanceMetadata: node %q", node.GetName())
	machine, err := metal.GetMachineFromNode(i.client, types.NodeName(node.Name))
	if err != nil {
		return nil, err
	}
	if machine == nil {
		return nil, fmt.Errorf("machine is nil for node:%s", node.Name)
	}
	nas, err := nodeAddresses(machine, i.defaultExternalNetwork)
	if err != nil {
		return nil, err
	}
	md := &cloudprovider.InstanceMetadata{
		InstanceType:  *machine.Size.ID,
		ProviderID:    fmt.Sprintf("metal://%s/%s", *machine.Partition.ID, *machine.ID),
		NodeAddresses: nas,
	}
	return md, nil
}
func ( i * InstancesController ) InstanceMetadata ( ctx context . Context , node * v1 . Node ) ( * cloudprovider . InstanceMetadata , error ) { klog . Infof ( " " , node . GetName ( ) ) machine , err := metal . GetMachineFromNode ( i . client , types . NodeName ( node . Name ) ) if err != nil { return nil , err } if machine == nil { return nil , fmt . Errorf ( " " , node . Name ) } nas , err := nodeAddresses ( machine , i . defaultExternalNetwork ) if err != nil { return nil , err } md := & cloudprovider . InstanceMetadata { InstanceType : * machine . Size . ID , ProviderID : fmt . Sprintf ( " " , * machine . Partition . ID , * machine . ID ) , NodeAddresses : nas , } return md , nil }
InstanceMetadata contains metadata about a specific instance.
InstanceMetadata contains metadata about a specific instance .