Validation: MixedInstancePolicy need not override instance types

The mixed instance policy is also useful for spot instances, and
generally overriding the instances doesn't seem to be required.

Also both 0 and 1 instance type overrides appear to be supported by
AWS.
This commit is contained in:
Justin SB 2020-05-31 23:35:06 -04:00
parent fddfe09edc
commit bced4c309b
1 changed files with 0 additions and 3 deletions

View File

@ -125,9 +125,6 @@ func ValidateInstanceGroup(g *kops.InstanceGroup) field.ErrorList {
func validatedMixedInstancesPolicy(path *field.Path, spec *kops.MixedInstancesPolicySpec, ig *kops.InstanceGroup) field.ErrorList {
var errs field.ErrorList
if len(spec.Instances) < 2 {
errs = append(errs, field.Invalid(path.Child("instances"), spec.Instances, "must be 2 or more instance types"))
}
// @step: check the instances are validate
for i, x := range spec.Instances {
errs = append(errs, awsValidateMachineType(path.Child("instances").Index(i).Child("instanceType"), x)...)