From bced4c309b06bb33041304012e321041a334c542 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Sun, 31 May 2020 23:35:06 -0400 Subject: [PATCH] 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. --- pkg/apis/kops/validation/instancegroup.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/apis/kops/validation/instancegroup.go b/pkg/apis/kops/validation/instancegroup.go index 50a51a641c..03e494e66b 100644 --- a/pkg/apis/kops/validation/instancegroup.go +++ b/pkg/apis/kops/validation/instancegroup.go @@ -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)...)