Merge pull request #100731 from kassarl/azurefile-InvalidCharacter-issue

Normalize share name to not include capital letters
This commit is contained in:
Kubernetes Prow Robot 2021-04-09 05:20:58 -07:00 committed by GitHub
commit a55bd63172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,9 +198,10 @@ func (a *azureFileProvisioner) Provision(selectedNode *v1.Node, allowedTopologie
}
if shareName == "" {
// File share name has a length limit of 63, and it cannot contain two consecutive '-'s.
// File share name has a length limit of 63, it cannot contain two consecutive '-'s, and all letters must be lower case.
name := util.GenerateVolumeName(a.options.ClusterName, a.options.PVName, 63)
shareName = strings.Replace(name, "--", "-", -1)
shareName = strings.ToLower(shareName)
}
if resourceGroup == "" {