azure: Hardcode DiskControllerType to SCSI

This commit is contained in:
Ciprian Hacman 2023-06-27 15:55:22 +03:00
parent 50454d8cfc
commit df97b95972
2 changed files with 4 additions and 2 deletions

View File

@ -192,9 +192,9 @@ func getStorageProfile(spec *kops.InstanceGroupSpec) (*compute.VirtualMachineSca
} }
return &compute.VirtualMachineScaleSetStorageProfile{ return &compute.VirtualMachineScaleSetStorageProfile{
DiskControllerType: fi.PtrTo(string(compute.SCSI)),
ImageReference: imageReference, ImageReference: imageReference,
OsDisk: &compute.VirtualMachineScaleSetOSDisk{ OsDisk: &compute.VirtualMachineScaleSetOSDisk{
// TODO(kenji): Support Windows.
OsType: compute.OperatingSystemTypes(compute.Linux), OsType: compute.OperatingSystemTypes(compute.Linux),
CreateOption: compute.DiskCreateOptionTypesFromImage, CreateOption: compute.DiskCreateOptionTypesFromImage,
DiskSizeGB: to.Int32Ptr(volumeSize), DiskSizeGB: to.Int32Ptr(volumeSize),

View File

@ -154,6 +154,7 @@ func TestGetStorageProfile(t *testing.T) {
}, },
}, },
profile: &compute.VirtualMachineScaleSetStorageProfile{ profile: &compute.VirtualMachineScaleSetStorageProfile{
DiskControllerType: fi.PtrTo(string(compute.SCSI)),
ImageReference: &compute.ImageReference{ ImageReference: &compute.ImageReference{
Publisher: to.StringPtr("Canonical"), Publisher: to.StringPtr("Canonical"),
Offer: to.StringPtr("UbuntuServer"), Offer: to.StringPtr("UbuntuServer"),
@ -177,6 +178,7 @@ func TestGetStorageProfile(t *testing.T) {
Role: kops.InstanceGroupRoleControlPlane, Role: kops.InstanceGroupRoleControlPlane,
}, },
profile: &compute.VirtualMachineScaleSetStorageProfile{ profile: &compute.VirtualMachineScaleSetStorageProfile{
DiskControllerType: fi.PtrTo(string(compute.SCSI)),
ImageReference: &compute.ImageReference{ ImageReference: &compute.ImageReference{
Publisher: to.StringPtr("Canonical"), Publisher: to.StringPtr("Canonical"),
Offer: to.StringPtr("UbuntuServer"), Offer: to.StringPtr("UbuntuServer"),