Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/asset/installconfig/gcp/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ func validateInstanceAndDiskType(fldPath *field.Path, diskType, instanceType, ar
}
diskTypes, ok := gcp.InstanceTypeToDiskTypeMap[family]
if !ok {
return field.NotFound(fldPath.Child("type"), family)
logrus.Warnf("unrecognized instance type %s with family %s", instanceType, family)
}

acceptedArmFamilies := sets.New("c4a", "n4a", "t2a")
acceptedArmFamilies := sets.New("c4a", "n4a", "t2a", "a4x")
if arch == types.ArchitectureARM64 && !acceptedArmFamilies.Has(family) {
return field.NotSupported(fldPath.Child("type"), family, sets.List(acceptedArmFamilies))
logrus.Warnf("unrecognized instance type %s with arm architecture family %s", instanceType, family)
}

if diskType != "" {
Expand Down
53 changes: 37 additions & 16 deletions pkg/types/gcp/machinepools.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,45 @@ var (
// InstanceTypeToDiskTypeMap contains a map where the key is the Instance Type, and the
// values are a list of disk types that are supported by the installer and correlate to the Instance Type.
InstanceTypeToDiskTypeMap = map[string][]string{
"a2": {PDStandard, PDSSD, PDBalanced},
"a3": {PDSSD, PDBalanced},
"c2": {PDStandard, PDSSD, PDBalanced},
"c2d": {PDStandard, PDSSD, PDBalanced},
"c3": {PDSSD, PDBalanced, HyperDiskBalanced},
"c3d": {PDSSD, PDBalanced, HyperDiskBalanced},
"c4": {HyperDiskBalanced},
"c4a": {HyperDiskBalanced},
"e2": {PDStandard, PDSSD, PDBalanced},
"g2": {PDStandard, PDSSD, PDBalanced},
"m1": {PDSSD, PDBalanced, HyperDiskBalanced},
// General Purpose Machine Family
Comment on lines 39 to +40
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep this list as a tracker for tested instance type? We should only update this when QE confirms with testing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok for these lists to be independent... Anything that is in the tested list should absolutely work, but it is ok for instance types to work that are not in the list.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sounds good to me :D

"c4d": {HyperDiskBalanced}, // unsupported: hyperdisk-extreme
"c4": {HyperDiskBalanced}, // unsupported: hyperdisk-extreme, hyperdisk-throughput, hyperdisk-balanced-high-availability
"c4a": {HyperDiskBalanced}, // unsupported: hyperdisk-extreme, hyperdisk-throughput, hyperdisk-balanced-high-availability, hyperdisk-ml
"c3": {PDSSD, PDBalanced, HyperDiskBalanced}, // unsupported: hyperdisk-extreme, hyperdisk-throughput, hyperdisk-balanced-high-availability, hyperdisk-ml
"c3d": {PDSSD, PDBalanced, HyperDiskBalanced}, // unsupported: hyperdisk-extreme, hyperdisk-throughput, hyperdisk-balanced-high-availability, hyperdisk-ml
"n4": {HyperDiskBalanced}, // unsupported: hyperdisk-throughput, hyperdisk-balanced-high-availability
"n4a": {HyperDiskBalanced}, // unsupported: hyperdisk-throughput, hyperdisk-balanced-high-availability
"n4d": {HyperDiskBalanced}, // unsupported: hyperdisk-throughput, hyperdisk-balanced-high-availability
"n2": {PDStandard, PDSSD, PDBalanced}, // unsupported: hyperdisk-extreme, hyperdisk-throughput, pd-extreme
"n2d": {PDStandard, PDSSD, PDBalanced}, // unsupported: hyperdisk-throughput
"n1": {PDStandard, PDSSD, PDBalanced},
"n2": {PDStandard, PDSSD, PDBalanced},
"n2d": {PDStandard, PDSSD, PDBalanced},
"n4": {HyperDiskBalanced},
"n4a": {HyperDiskBalanced},
"e2": {PDStandard, PDSSD, PDBalanced},
"t2a": {PDStandard, PDSSD, PDBalanced},
"t2d": {PDStandard, PDSSD, PDBalanced},
"t2d": {PDStandard, PDSSD, PDBalanced}, // unsupported: hyperdisk-throughput

// Storage Optimized Machine Family
"z3": {PDBalanced, PDSSD, HyperDiskBalanced}, // unsupported: hyperdisk-extreme, hyperdisk-throughput, hyperdisk-balanced-high-availability

// Compute Optimized Machine Family
"h4d": {HyperDiskBalanced},
"h3": {PDBalanced, HyperDiskBalanced}, // unsupported: hyperdisk-throughput
"c2": {PDStandard, PDSSD, PDBalanced},
"c2d": {PDStandard, PDSSD, PDBalanced},

// Memory Optimized Machine Family
"x4": {HyperDiskBalanced}, // unsupported: hyperdisk-extreme
"m4": {HyperDiskBalanced}, // unsupported: hyperdisk-extreme
"m3": {PDSSD, PDBalanced, HyperDiskBalanced}, // unsupported: hyperdisk-extreme, hyperdisk-throughput, hyperdisk-balanced-high-availability, pd-extreme
"m2": {PDSSD, PDBalanced, HyperDiskBalanced}, // unsupported: hyperdisk-extreme, pd-extreme
"m1": {PDSSD, PDBalanced, HyperDiskBalanced}, // unsupported: hyperdisk-extreme, pd-extreme

// Accelerator Optimized Machine Family
"a4x": {HyperDiskBalanced}, // unsupported: hyperdisk-balanced-high-availability
"a4": {HyperDiskBalanced}, // unsupported: hyperdisk-extreme
"a3": {PDSSD, PDBalanced}, // unsupported: hyperdisk-balanced-high-availability, hyperdisk-extreme
"a2": {PDStandard, PDSSD, PDBalanced}, // unsupported: hyperdisk-ml
"g4": {HyperDiskBalanced}, // unsupported: hyperdisk-extreme, hyperdisk-throughput, hyperdisk-balanced-high-availability
"g2": {PDStandard, PDSSD, PDBalanced}, // unsupported: hyperdisk-ml, hyperdisk-throughput
}
)

Expand Down