mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Set instanceID to azure resource ID format while useInstanceMetadata is enabled
This commit is contained in:
parent
b3ec8295be
commit
20de29ae6f
@ -112,10 +112,8 @@ func (az *Cloud) InstanceID(ctx context.Context, name types.NodeName) (string, e
|
||||
return "", err
|
||||
}
|
||||
if isLocalInstance {
|
||||
externalInstanceID, err := az.metadata.Text("instance/compute/vmId")
|
||||
if err == nil {
|
||||
return externalInstanceID, nil
|
||||
}
|
||||
nodeName := mapNodeNameToVMName(name)
|
||||
return az.getMachineID(nodeName), nil
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user