Skip to content

Commit

Permalink
Normalize share name to not include capital letters
Browse files Browse the repository at this point in the history
  • Loading branch information
kassarl authored and andyzhangx committed Apr 28, 2021
1 parent 708b441 commit 749b68f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/volume/azure_file/azure_provision.go
Expand Up @@ -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]
Expand Down

0 comments on commit 749b68f

Please sign in to comment.