Normalize share name to not include capital letters

This commit is contained in:
Laila Kassar 2021-03-31 23:52:36 +00:00
parent 93d288e2a4
commit 7514ad4467

View File

@ -198,10 +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(strings.Replace(name, "--", "-", -1))
}
if resourceGroup == "" {
resourceGroup = a.options.PVC.ObjectMeta.Annotations[resourceGroupAnnotation]