Skip to content

Commit

Permalink
Emit a warning message when t2.nano or t2.micro is set for `*inst…
Browse files Browse the repository at this point in the history
…anceType`

closes kubernetes-retired#258
  • Loading branch information
mumoshu committed Mar 1, 2017
1 parent 6c5b6ec commit 2e273f5
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 2e273f5

Please sign in to comment.