Update pkg/volume/azure_file/azure_provision.go

Co-authored-by: Shiming Zhang <wzshiming@foxmail.com>
This commit is contained in:
Laila Kassar 2021-03-31 22:54:21 -05:00 committed by GitHub
parent 7514ad4467
commit a5fdad260f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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