Skip to content

Commit

Permalink
Update pkg/volume/azure_file/azure_provision.go
Browse files Browse the repository at this point in the history
Co-authored-by: Shiming Zhang <wzshiming@foxmail.com>
  • Loading branch information
2 people authored and andyzhangx committed Apr 28, 2021
1 parent 749b68f commit 5f40131
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/volume/azure_file/azure_provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ func (a *azureFileProvisioner) Provision(selectedNode *v1.Node, allowedTopologie
if shareName == "" {
// 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.ToLower(strings.Replace(name, "--", "-", -1))
}
shareName = strings.Replace(name, "--", "-", -1)
shareName = strings.ToLower(shareName)
}

if resourceGroup == "" {
resourceGroup = a.options.PVC.ObjectMeta.Annotations[resourceGroupAnnotation]
Expand Down

0 comments on commit 5f40131

Please sign in to comment.