mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +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
|
return "", err
|
||||||
}
|
}
|
||||||
if isLocalInstance {
|
if isLocalInstance {
|
||||||
externalInstanceID, err := az.metadata.Text("instance/compute/vmId")
|
nodeName := mapNodeNameToVMName(name)
|
||||||
if err == nil {
|
return az.getMachineID(nodeName), nil
|
||||||
return externalInstanceID, nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user