You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Replace Expect(requestError).NotTo(HaveOccurred()) (struct, not error)
with explicit Code/Message emptiness checks for clearer failures.
- Extract nextLargerSupportedMasterVMSize helper that selects the
smallest supported master SKU in the same family with a higher core
count, replacing the hardcoded D<->E family swap.
return"", fmt.Errorf("current VM size %q is not in the supported master list", currentVMSize)
72
+
}
73
+
74
+
targetSku:=""
75
+
targetCores:=math.MaxInt
76
+
forsize, info:=rangesupportedMasterSizes {
77
+
ifinfo.Family!=currentInfo.Family {
78
+
continue
79
+
}
80
+
ifinfo.CoreCount<=currentInfo.CoreCount {
81
+
continue
82
+
}
83
+
ifinfo.CoreCount<targetCores {
84
+
targetCores=info.CoreCount
85
+
targetSku=string(size)
86
+
}
87
+
}
88
+
89
+
iftargetSku=="" {
90
+
return"", fmt.Errorf("no supported master VM size larger than %q (family %s, %d cores) is available", currentVMSize, currentInfo.Family, currentInfo.CoreCount)
91
+
}
92
+
returntargetSku, nil
93
+
}
94
+
61
95
// validateMasterVMSizeLabels makes sure that master machine and node Resources in the cluster have the correct vmsize labels. It verifies that the following are equal to the targetSku
62
96
// - metadata.labels."machine.openshift.io/instance-type" for machine
0 commit comments