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

Commit 376ec21

Browse files
authored
Merge pull request #369 from mumoshu/warn-nano-and-micro
Emit a warning message when `t2.nano` or `t2.micro` is set for `*instanceType`
2 parents 6c5b6ec + 2e273f5 commit 376ec21

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

core/controlplane/config/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,10 @@ func (c Cluster) valid() error {
872872
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)
873873
}
874874

875+
if c.ControllerInstanceType == "t2.micro" || c.EtcdInstanceType == "t2.micro" || c.ControllerInstanceType == "t2.nano" || c.EtcdInstanceType == "t2.nano" {
876+
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`)
877+
}
878+
875879
return nil
876880
}
877881

model/node_pool_config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ func (c NodePoolConfig) Valid() error {
111111
return err
112112
}
113113

114+
if c.InstanceType == "t2.micro" || c.InstanceType == "t2.nano" {
115+
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`)
116+
}
117+
114118
return nil
115119
}
116120

0 commit comments

Comments
 (0)