Add disk_iops variable for AWS

* Setting disk_iops is required for disk_type io1
* https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html#EBSVolumeTypes
This commit is contained in:
Robert Fairburn 2018-10-15 09:59:35 -05:00 committed by Dalton Hubble
parent 3b44972d78
commit 0be4673e44
11 changed files with 34 additions and 0 deletions

View File

@ -4,6 +4,10 @@ Notable changes between versions.
## Latest ## Latest
#### AWS
* Add `disk_iops` variable for EBS volume IOPS ([#314](https://github.com/poseidon/typhoon/pull/314))
## v1.12.1 ## v1.12.1
* Kubernetes [v1.12.1](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.12.md#v1121) * Kubernetes [v1.12.1](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.12.md#v1121)

View File

@ -30,6 +30,7 @@ resource "aws_instance" "controllers" {
root_block_device { root_block_device {
volume_type = "${var.disk_type}" volume_type = "${var.disk_type}"
volume_size = "${var.disk_size}" volume_size = "${var.disk_size}"
iops = "${var.disk_iops}"
} }
# network # network

View File

@ -59,6 +59,12 @@ variable "disk_type" {
description = "Type of the EBS volume (e.g. standard, gp2, io1)" description = "Type of the EBS volume (e.g. standard, gp2, io1)"
} }
variable "disk_iops" {
type = "string"
default = "0"
description = "IOPS of the EBS volume (e.g. 100)"
}
variable "worker_price" { variable "worker_price" {
type = "string" type = "string"
default = "" default = ""

View File

@ -52,6 +52,12 @@ variable "disk_type" {
description = "Type of the EBS volume (e.g. standard, gp2, io1)" description = "Type of the EBS volume (e.g. standard, gp2, io1)"
} }
variable "disk_iops" {
type = "string"
default = "0"
description = "IOPS of the EBS volume (required for io1)"
}
variable "spot_price" { variable "spot_price" {
type = "string" type = "string"
default = "" default = ""

View File

@ -52,6 +52,7 @@ resource "aws_launch_configuration" "worker" {
root_block_device { root_block_device {
volume_type = "${var.disk_type}" volume_type = "${var.disk_type}"
volume_size = "${var.disk_size}" volume_size = "${var.disk_size}"
iops = "${var.disk_iops}"
} }
# network # network

View File

@ -30,6 +30,7 @@ resource "aws_instance" "controllers" {
root_block_device { root_block_device {
volume_type = "${var.disk_type}" volume_type = "${var.disk_type}"
volume_size = "${var.disk_size}" volume_size = "${var.disk_size}"
iops = "${var.disk_iops}"
} }
# network # network

View File

@ -53,6 +53,12 @@ variable "disk_type" {
description = "Type of the EBS volume (e.g. standard, gp2, io1)" description = "Type of the EBS volume (e.g. standard, gp2, io1)"
} }
variable "disk_iops" {
type = "string"
default = "0"
description = "IOPS of the EBS volume (e.g. 100)"
}
variable "worker_price" { variable "worker_price" {
type = "string" type = "string"
default = "" default = ""

View File

@ -46,6 +46,12 @@ variable "disk_type" {
description = "Type of the EBS volume (e.g. standard, gp2, io1)" description = "Type of the EBS volume (e.g. standard, gp2, io1)"
} }
variable "disk_iops" {
type = "string"
default = "0"
description = "IOPS of the EBS volume (required for io1)"
}
variable "spot_price" { variable "spot_price" {
type = "string" type = "string"
default = "" default = ""

View File

@ -52,6 +52,7 @@ resource "aws_launch_configuration" "worker" {
root_block_device { root_block_device {
volume_type = "${var.disk_type}" volume_type = "${var.disk_type}"
volume_size = "${var.disk_size}" volume_size = "${var.disk_size}"
iops = "${var.disk_iops}"
} }
# network # network

View File

@ -227,6 +227,7 @@ Reference the DNS zone id with `"${aws_route53_zone.zone-for-clusters.zone_id}"`
| worker_type | EC2 instance type for workers | "t2.small" | See below | | worker_type | EC2 instance type for workers | "t2.small" | See below |
| disk_size | Size of the EBS volume in GB | "40" | "100" | | disk_size | Size of the EBS volume in GB | "40" | "100" |
| disk_type | Type of the EBS volume | "gp2" | standard, gp2, io1 | | disk_type | Type of the EBS volume | "gp2" | standard, gp2, io1 |
| disk_iops | IOPS of the EBS volume | "0" (i.e. auto) | "400" |
| worker_price | Spot price in USD for workers. Leave as default empty string for regular on-demand instances | "" | "0.10" | | worker_price | Spot price in USD for workers. Leave as default empty string for regular on-demand instances | "" | "0.10" |
| networking | Choice of networking provider | "calico" | "calico" or "flannel" | | networking | Choice of networking provider | "calico" | "calico" or "flannel" |
| network_mtu | CNI interface MTU (calico only) | 1480 | 8981 | | network_mtu | CNI interface MTU (calico only) | 1480 | 8981 |

View File

@ -244,6 +244,7 @@ Reference the DNS zone id with `"${aws_route53_zone.zone-for-clusters.zone_id}"`
| os_image | AMI channel for a Container Linux derivative | coreos-stable | coreos-stable, coreos-beta, coreos-alpha, flatcar-stable, flatcar-beta, flatcar-alpha | | os_image | AMI channel for a Container Linux derivative | coreos-stable | coreos-stable, coreos-beta, coreos-alpha, flatcar-stable, flatcar-beta, flatcar-alpha |
| disk_size | Size of the EBS volume in GB | "40" | "100" | | disk_size | Size of the EBS volume in GB | "40" | "100" |
| disk_type | Type of the EBS volume | "gp2" | standard, gp2, io1 | | disk_type | Type of the EBS volume | "gp2" | standard, gp2, io1 |
| disk_iops | IOPS of the EBS volume | "0" (i.e. auto) | "400" |
| worker_price | Spot price in USD for workers. Leave as default empty string for regular on-demand instances | "" | "0.10" | | worker_price | Spot price in USD for workers. Leave as default empty string for regular on-demand instances | "" | "0.10" |
| controller_clc_snippets | Controller Container Linux Config snippets | [] | [example](/advanced/customization/) | | controller_clc_snippets | Controller Container Linux Config snippets | [] | [example](/advanced/customization/) |
| worker_clc_snippets | Worker Container Linux Config snippets | [] | [example](/advanced/customization/) | | worker_clc_snippets | Worker Container Linux Config snippets | [] | [example](/advanced/customization/) |