Skip to content

Commit

Permalink
Merge pull request kubernetes#101551 from andyzhangx/automated-cherry…
Browse files Browse the repository at this point in the history
…-pick-of-#100731-upstream-release-1.19

Automated cherry pick of kubernetes#100731: Normalize share name to not include capital letters
  • Loading branch information
k8s-ci-robot committed May 7, 2021
2 parents 59dede3 + 5a5fb3e commit 365baf0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/volume/azure_file/azure_provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand Down

0 comments on commit 365baf0

Please sign in to comment.