Skip to content

Commit

Permalink
Validation: MixedInstancePolicy need not override instance types
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
justinsb committed Jun 1, 2020
1 parent fddfe09 commit bced4c3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/apis/kops/validation/instancegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)...)
Expand Down

0 comments on commit bced4c3

Please sign in to comment.