Skip to content

Commit

Permalink
Merge pull request #41232 from colemickens/automated-cherry-pick-of-#…
Browse files Browse the repository at this point in the history
…40030-kubernetes-release-1.5

Automatic merge from submit-queue

Automated cherry pick of #40030

Cherry pick of #40030 on release-1.5.

#40030: azure disk: restrict length of name
  • Loading branch information
Kubernetes Submit Queue committed Feb 10, 2017
2 parents 74c454e + 52d1a71 commit 8d72a3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/volume/azure_dd/azure_provision.go
Expand Up @@ -107,7 +107,8 @@ var _ volume.Provisioner = &azureDiskProvisioner{}
func (a *azureDiskProvisioner) Provision() (*api.PersistentVolume, error) {
var sku, location, account string

name := volume.GenerateVolumeName(a.options.ClusterName, a.options.PVName, 255)
// maxLength = 79 - (4 for ".vhd") = 75
name := volume.GenerateVolumeName(a.options.ClusterName, a.options.PVName, 75)
capacity := a.options.PVC.Spec.Resources.Requests[api.ResourceName(api.ResourceStorage)]
requestBytes := capacity.Value()
requestGB := int(volume.RoundUpSize(requestBytes, 1024*1024*1024))
Expand Down

0 comments on commit 8d72a3e

Please sign in to comment.