-
Notifications
You must be signed in to change notification settings - Fork 255
Conversation
Ran 19 of 19 Specs in 4697.501 seconds
SUCCESS! -- 19 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestAADPodIdentity (4697.43s)
PASS
ok github.com/Azure/aad-pod-identity/test/e2e 4697.501s |
@@ -96,6 +96,11 @@ func makeVMSSID(r azure.Resource) string { | |||
return path.Join(r.SubscriptionID, r.ResourceGroup, r.ResourceName) | |||
} | |||
|
|||
func getVMSSName(vmssID string) string { | |||
_, resourceName := path.Split(vmssID) |
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.
Is it possible to have an erroneous vmssID, if so how do we handle this ?
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.
If the vmssID is erroneous, then we fail while trying to create the client and not perform any operations.
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.
Can we please handle the error for the path.Split returning an empty string ?
wg.Add(1) | ||
// node is no longer found in the cluster, all the assigned identities that were created in this sync loop | ||
// and those that already exist for this node need to be deleted. | ||
go c.cleanUpAllAssignedIdentitiesOnNode(nodeName, nodeTrackList, wg) |
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.
If we use anonymous function, we don't have to pass wg to cleanUpAllAssignedIdentitiesOnNode. Is that idiomatic way to use ?
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.
I'm passing the same wg for consolidating vmss node (which perform the cleanup if reqd) and update node deps. That way all our processing is done async.
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.
/lgtm - few nits.
Reason for Change:
Update identity in vmss only once as identity is across all nodes in vmss and not just single node.
Issue Fixed:
Fixes #361
Notes for Reviewers: