From 0058773a7787d1a8675ed1a2f98d07ab6d8cf174 Mon Sep 17 00:00:00 2001 From: Robert Fairburn Date: Mon, 15 Oct 2018 09:59:35 -0500 Subject: [PATCH] support IOPS in AWS (required for io1) --- aws/container-linux/kubernetes/controllers.tf | 1 + aws/container-linux/kubernetes/variables.tf | 6 ++++++ aws/container-linux/kubernetes/workers/variables.tf | 6 ++++++ aws/container-linux/kubernetes/workers/workers.tf | 1 + aws/fedora-atomic/kubernetes/controllers.tf | 1 + aws/fedora-atomic/kubernetes/variables.tf | 6 ++++++ aws/fedora-atomic/kubernetes/workers/variables.tf | 6 ++++++ aws/fedora-atomic/kubernetes/workers/workers.tf | 1 + docs/atomic/aws.md | 1 + docs/cl/aws.md | 1 + 10 files changed, 30 insertions(+) diff --git a/aws/container-linux/kubernetes/controllers.tf b/aws/container-linux/kubernetes/controllers.tf index fd736d291..443ef9498 100644 --- a/aws/container-linux/kubernetes/controllers.tf +++ b/aws/container-linux/kubernetes/controllers.tf @@ -30,6 +30,7 @@ resource "aws_instance" "controllers" { root_block_device { volume_type = "${var.disk_type}" volume_size = "${var.disk_size}" + iops = "${var.disk_iops}" } # network diff --git a/aws/container-linux/kubernetes/variables.tf b/aws/container-linux/kubernetes/variables.tf index a7d4f8565..475e3a51d 100644 --- a/aws/container-linux/kubernetes/variables.tf +++ b/aws/container-linux/kubernetes/variables.tf @@ -59,6 +59,12 @@ variable "disk_type" { 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 "worker_price" { type = "string" default = "" diff --git a/aws/container-linux/kubernetes/workers/variables.tf b/aws/container-linux/kubernetes/workers/variables.tf index 068392564..1c91eb608 100644 --- a/aws/container-linux/kubernetes/workers/variables.tf +++ b/aws/container-linux/kubernetes/workers/variables.tf @@ -52,6 +52,12 @@ variable "disk_type" { 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" { type = "string" default = "" diff --git a/aws/container-linux/kubernetes/workers/workers.tf b/aws/container-linux/kubernetes/workers/workers.tf index 082a8ec2a..ba9905081 100644 --- a/aws/container-linux/kubernetes/workers/workers.tf +++ b/aws/container-linux/kubernetes/workers/workers.tf @@ -52,6 +52,7 @@ resource "aws_launch_configuration" "worker" { root_block_device { volume_type = "${var.disk_type}" volume_size = "${var.disk_size}" + iops = "${var.disk_iops}" } # network diff --git a/aws/fedora-atomic/kubernetes/controllers.tf b/aws/fedora-atomic/kubernetes/controllers.tf index f71b5219c..0ed35e057 100644 --- a/aws/fedora-atomic/kubernetes/controllers.tf +++ b/aws/fedora-atomic/kubernetes/controllers.tf @@ -30,6 +30,7 @@ resource "aws_instance" "controllers" { root_block_device { volume_type = "${var.disk_type}" volume_size = "${var.disk_size}" + iops = "${var.disk_iops}" } # network diff --git a/aws/fedora-atomic/kubernetes/variables.tf b/aws/fedora-atomic/kubernetes/variables.tf index 6747e38c5..071482e14 100644 --- a/aws/fedora-atomic/kubernetes/variables.tf +++ b/aws/fedora-atomic/kubernetes/variables.tf @@ -53,6 +53,12 @@ variable "disk_type" { 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 "worker_price" { type = "string" default = "" diff --git a/aws/fedora-atomic/kubernetes/workers/variables.tf b/aws/fedora-atomic/kubernetes/workers/variables.tf index a38c1060c..69b74af4f 100644 --- a/aws/fedora-atomic/kubernetes/workers/variables.tf +++ b/aws/fedora-atomic/kubernetes/workers/variables.tf @@ -46,6 +46,12 @@ variable "disk_type" { 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" { type = "string" default = "" diff --git a/aws/fedora-atomic/kubernetes/workers/workers.tf b/aws/fedora-atomic/kubernetes/workers/workers.tf index b139081ae..77832f7e5 100644 --- a/aws/fedora-atomic/kubernetes/workers/workers.tf +++ b/aws/fedora-atomic/kubernetes/workers/workers.tf @@ -52,6 +52,7 @@ resource "aws_launch_configuration" "worker" { root_block_device { volume_type = "${var.disk_type}" volume_size = "${var.disk_size}" + iops = "${var.disk_iops}" } # network diff --git a/docs/atomic/aws.md b/docs/atomic/aws.md index f4bb44c59..b7e6a1da6 100644 --- a/docs/atomic/aws.md +++ b/docs/atomic/aws.md @@ -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 | | disk_size | Size of the EBS volume in GB | "40" | "100" | | disk_type | Type of the EBS volume | "gp2" | standard, gp2, io1 | +| disk_iops | IOPS of the EBS volume (0 for EBS default) | "0" | "400" | | 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" | | network_mtu | CNI interface MTU (calico only) | 1480 | 8981 | diff --git a/docs/cl/aws.md b/docs/cl/aws.md index 17836a8f5..28724544c 100644 --- a/docs/cl/aws.md +++ b/docs/cl/aws.md @@ -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 | | disk_size | Size of the EBS volume in GB | "40" | "100" | | disk_type | Type of the EBS volume | "gp2" | standard, gp2, io1 | +| disk_iops | IOPS of the EBS volume (0 for EBS default) | "0" | "400" | | 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.md) | | worker_clc_snippets | Worker Container Linux Config snippets | [] | [example](/advanced/customization.md) |