Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #369 from mumoshu/warn-nano-and-micro
Browse files Browse the repository at this point in the history
Emit a warning message when `t2.nano` or `t2.micro` is set for `*instanceType`
  • Loading branch information
mumoshu authored Mar 1, 2017
2 parents 6c5b6ec + 2e273f5 commit 376ec21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/controlplane/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,10 @@ func (c Cluster) valid() error {
return fmt.Errorf("awsNodeLabels can't be enabled for controllers because the total number of characters in clusterName(=\"%s\") exceeds the limit of %d", c.ClusterName, limit)
}

if c.ControllerInstanceType == "t2.micro" || c.EtcdInstanceType == "t2.micro" || c.ControllerInstanceType == "t2.nano" || c.EtcdInstanceType == "t2.nano" {
fmt.Println(`WARNING: instance types "t2.nano" and "t2.micro" are not recommended. See https://github.com/coreos/kube-aws/issues/258 for more information`)
}

return nil
}

Expand Down
4 changes: 4 additions & 0 deletions model/node_pool_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ func (c NodePoolConfig) Valid() error {
return err
}

if c.InstanceType == "t2.micro" || c.InstanceType == "t2.nano" {
fmt.Println(`WARNING: instance types "t2.nano" and "t2.micro" are not recommended. See https://github.com/coreos/kube-aws/issues/258 for more information`)
}

return nil
}

Expand Down

0 comments on commit 376ec21

Please sign in to comment.