mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-23 02:47:57 +00:00
Azure - do not use 0 zone or empty string for zone when creating PVs
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user