-
Notifications
You must be signed in to change notification settings - Fork 38.9k
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
Convert resource group name in Azure provider ID to lower cases #74882
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feiskyer 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 |
/test pull-kubernetes-e2e-aks-engine-azure |
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.
there are other functions like getFrontendIPConfigID
, getBackendPoolID
, especially getFrontendIPConfigID
func since az.ResourceGroup
is read from azure.json
config file, it's controlled by user config, could be upper case.
func (az *Cloud) getFrontendIPConfigID(lbName, fipConfigName string) string {
return fmt.Sprintf(
frontendIPConfigIDTemplate,
az.SubscriptionID,
az.ResourceGroup,
lbName,
fipConfigName)
}
@@ -185,7 +185,13 @@ func (ss *scaleSet) GetInstanceIDByNodeName(name string) (string, error) { | |||
return "", err | |||
} | |||
|
|||
return *vm.ID, nil | |||
resourceID := *vm.ID |
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.
return convertResourceGroupNameToLower(*vm.ID)
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.
add an error log here
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.
then add this log into function convertResourceGroupNameToLower
?
Other IDs are used only internally, hence it's ok of any cases. Only exposed providerID is required for conversion. |
158b193
to
1d61d8d
Compare
/test pull-kubernetes-e2e-aks-engine-azure |
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
/retest Review the full test history for this PR. Silence the bot with an |
Convert resource group name in Azure provider ID to lower cases
What type of PR is this?
What this PR does / why we need it:
The resource group name in Azure VM's ID may be in different cases from time to time. This would cause the node's providerID are also in different cases.
While it's still working, this different cases issue may introduce troubles for external components that are dpending on providerID (e.g. cluster autoscaler).
This PR converts the resource group name in Azure provider ID to lower cases, so that all nodes' providerID are still in same cases in such case.
Which issue(s) this PR fixes:
Fixes #71994
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
/sig azure
/kind bug
/priority critical-urgent
/milestone v1.14