Skip to content

Commit

Permalink
Clean up node volume size config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarp committed Sep 27, 2018
1 parent 32c81b9 commit b02525c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ eksctl create cluster --tags environment=staging --region=us-east-1
To configure node volume size, use the `--node-volume-size` flag.

```
eksctl create cluster --node-volume-size 50
eksctl create cluster --node-volume-size=50
```

> NOTE: In `us-east-1` you are likely to get `UnsupportedAvailabilityZoneException`. If you do, copy the suggested zones and pass `--zones` flag, e.g. `eksctl create cluster --region=us-east-1 --zones=us-east-1a,us-east-1b,us-east-1d`. This may occur in other regions, but less likely. You shouldn't need to use `--zone` flag otherwise.
Expand Down
2 changes: 1 addition & 1 deletion cmd/eksctl/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func createClusterCmd() *cobra.Command {

fs.StringVarP(&cfg.Region, "region", "r", api.DEFAULT_EKS_REGION, "AWS region")
fs.StringVarP(&cfg.Profile, "profile", "p", "", "AWS credentials profile to use (overrides the AWS_PROFILE environment variable)")
fs.IntVarP(&cfg.NodeVolumeSize, "node-volume-size", "", 0, "Node volume size (in GB)")
fs.StringToStringVarP(&cfg.Tags, "tags", "", map[string]string{}, `A list of KV pairs used to tag the AWS resources (e.g. "Owner=John Doe,Team=Some Team")`)

fs.StringVarP(&cfg.NodeType, "node-type", "t", DEFAULT_NODE_TYPE, "node instance type")
Expand All @@ -76,6 +75,7 @@ func createClusterCmd() *cobra.Command {
fs.IntVarP(&cfg.MinNodes, "nodes-min", "m", 0, "minimum nodes in ASG")
fs.IntVarP(&cfg.MaxNodes, "nodes-max", "M", 0, "maximum nodes in ASG")

fs.IntVarP(&cfg.NodeVolumeSize, "node-volume-size", "", 0, "Node volume size (in GB)")
fs.IntVar(&cfg.MaxPodsPerNode, "max-pods-per-node", 0, "maximum number of pods per node (set automatically if unspecified)")
fs.StringSliceVar(&availabilityZones, "zones", nil, "(auto-select if unspecified)")

Expand Down
11 changes: 6 additions & 5 deletions pkg/eks/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ type ClusterConfig struct {
Tags map[string]string
ClusterName string

NodeAMI string
NodeType string
Nodes int
NodeAMI string
NodeType string
Nodes int
MinNodes int
MaxNodes int

NodeVolumeSize int
MinNodes int
MaxNodes int

MaxPodsPerNode int

Expand Down

0 comments on commit b02525c

Please sign in to comment.