Skip to content

Commit ce02f42

Browse files
committed
2 parents 37e19fd + 4168542 commit ce02f42

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/gce-cloud-provider/compute/gce-compute.go

+10
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,11 @@ func (cloud *CloudProvider) insertRegionalDisk(
638638
gceAPIVersion = GCEAPIVersionV1
639639
)
640640

641+
// Use beta API for non-hyperdisk types in multi-writer mode.
642+
if multiWriter && !strings.Contains(params.DiskType, "hyperdisk") {
643+
gceAPIVersion = GCEAPIVersionBeta
644+
}
645+
641646
diskToCreate := &computev1.Disk{
642647
Name: volKey.Name,
643648
SizeGb: common.BytesToGbRoundUp(capBytes),
@@ -762,6 +767,11 @@ func (cloud *CloudProvider) insertZonalDisk(
762767
gceAPIVersion = GCEAPIVersionV1
763768
)
764769

770+
// Use beta API for non-hyperdisk types in multi-writer mode.
771+
if multiWriter && !strings.Contains(params.DiskType, "hyperdisk") {
772+
gceAPIVersion = GCEAPIVersionBeta
773+
}
774+
765775
diskToCreate := &computev1.Disk{
766776
Name: volKey.Name,
767777
SizeGb: common.BytesToGbRoundUp(capBytes),

0 commit comments

Comments
 (0)