-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix VM provider ID to match node ID #1293
Fix VM provider ID to match node ID #1293
Conversation
This should not be a breaking change as the providerID is mutable and should get reconciled on existing clusters, verifying that assumption. /hold |
@@ -38,14 +38,14 @@ var sampleSubjectFactory = []infrav1.UserAssignedIdentity{ | |||
} | |||
|
|||
var expectedVMSDKObject = map[string]*compute.VirtualMachineIdentityUserAssignedIdentitiesValue{ | |||
"foo": {}, | |||
"bar": {}, | |||
"/foo": {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nader-ziada need your help figuring out if this is indeed what we want... The comment on UserAssignedIdentitiesToVMSDK
say:
// The user identity dictionary key references will be ARM resource ids in the form: // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
So I think we expect only the leading azure://
to be removed, the rest (including the leading /
) should be kept there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I believe you are correct to assume we should keep one /
Before:
After:
/hold cancel |
/retest |
creating a (dummy) approve comment to re-trigger CI, the approval mechanism was broken for a bit - kubernetes/test-infra#21687 /approve |
lgtm (other than Shyam comments) |
5396d12
to
9757a20
Compare
9757a20
to
7c4ec06
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nader-ziada, nikhita The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Cloud provider sets the ID by doing azure + :// + ID
https://github.com/kubernetes-sigs/cloud-provider-azure/blob/28f04006af77503360c42c5c3930ea707b897108/pkg/node/node.go#L63
Whereas CAPZ sets the ID with 3 slashes: azure+ :/// + ID:
https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/master/azure/services/virtualmachines/virtualmachines.go#L97
the ID itself starts with a / so it ends up being 3 vs 4 slashes.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #1292
Special notes for your reviewer: This also makes the Machine provider IDs consistent with MachinePool instance provider IDs which were already prefixed with
azure://
https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/master/azure/services/scalesets/scalesets.go#L122Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
TODOs:
Release note: