File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -908,10 +908,6 @@ func (cc *Config) validate(awsClient *aws.Client) error {
908908 ngNames := []string {}
909909 instances := []aws.InstanceTypeRequests {}
910910 for _ , nodeGroup := range cc .NodeGroups {
911- // setting max_instances to 0 during cluster creation is not permitted (but scaling max_instances to 0 afterwards is allowed)
912- if nodeGroup .MaxInstances == 0 {
913- return errors .Wrap (ErrorNodeGroupMaxInstancesIsZero (), NodeGroupsKey , nodeGroup .Name )
914- }
915911 if ! slices .HasString (ngNames , nodeGroup .Name ) {
916912 ngNames = append (ngNames , nodeGroup .Name )
917913 } else {
@@ -1123,6 +1119,13 @@ func (cc *Config) ValidateOnInstall(awsClient *aws.Client) error {
11231119 return err
11241120 }
11251121
1122+ // setting max_instances to 0 during cluster creation is not permitted (but scaling max_instances to 0 afterwards is allowed)
1123+ for _ , nodeGroup := range cc .NodeGroups {
1124+ if nodeGroup != nil && nodeGroup .MaxInstances == 0 {
1125+ return errors .Wrap (ErrorNodeGroupMaxInstancesIsZero (), NodeGroupsKey , nodeGroup .Name )
1126+ }
1127+ }
1128+
11261129 if cc .ClusterUID != "" {
11271130 return ErrorDisallowedField (ClusterUIDKey )
11281131 }
You can’t perform that action at this time.
0 commit comments