Azure - do not use 0 zone or empty string for zone when creating PVs

This commit is contained in:
Hemant Kumar
2020-04-27 16:03:36 -04:00
parent 52243decf1
commit 850da22c02
2 changed files with 10 additions and 3 deletions

View File

@@ -72,10 +72,14 @@ func (p *Provider) CreatePD(zone string) (string, error) {
PVCName: pdName,
SizeGB: 1,
Tags: nil,
AvailabilityZone: zone,
DiskIOPSReadWrite: "",
DiskMBpsReadWrite: "",
}
// do not use blank zone definition
if len(zone) > 0 && zone != "0" {
volumeOptions.AvailabilityZone = zone
}
return p.azureCloud.CreateManagedDisk(volumeOptions)
}