Add stricter types for AWS modules and update docs

* Review variables available in AWS kubernetes and workers
modules and documentation
* Switching between spot and on-demand has worked since
Terraform v0.12
* Generally, there are too many knobs. Less useful ones
should be de-emphasized or removed
* Remove `cluster_domain_suffix` documentation
This commit is contained in:
Dalton Hubble 2019-09-29 11:14:36 -07:00
parent f453c54956
commit a407ff72df
10 changed files with 118 additions and 114 deletions

View File

@ -8,6 +8,7 @@ Notable changes between versions.
#### AWS #### AWS
* Add Terraform v0.12 variables types ([#553](https://github.com/poseidon/typhoon/pull/553))
* Add `node_labels` variable to internal `workers` module ([#550](https://github.com/poseidon/typhoon/pull/550)) * Add `node_labels` variable to internal `workers` module ([#550](https://github.com/poseidon/typhoon/pull/550))
#### Azure #### Azure

View File

@ -18,57 +18,57 @@ variable "dns_zone_id" {
# instances # instances
variable "controller_count" { variable "controller_count" {
type = string type = number
default = "1"
description = "Number of controllers (i.e. masters)" description = "Number of controllers (i.e. masters)"
default = 1
} }
variable "worker_count" { variable "worker_count" {
type = string type = number
default = "1"
description = "Number of workers" description = "Number of workers"
default = 1
} }
variable "controller_type" { variable "controller_type" {
type = string type = string
default = "t3.small"
description = "EC2 instance type for controllers" description = "EC2 instance type for controllers"
default = "t3.small"
} }
variable "worker_type" { variable "worker_type" {
type = string type = string
default = "t3.small"
description = "EC2 instance type for workers" description = "EC2 instance type for workers"
default = "t3.small"
} }
variable "os_image" { variable "os_image" {
type = string type = string
default = "coreos-stable"
description = "AMI channel for a Container Linux derivative (coreos-stable, coreos-beta, coreos-alpha, flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge)" description = "AMI channel for a Container Linux derivative (coreos-stable, coreos-beta, coreos-alpha, flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge)"
default = "coreos-stable"
} }
variable "disk_size" { variable "disk_size" {
type = string type = number
default = "40"
description = "Size of the EBS volume in GB" description = "Size of the EBS volume in GB"
default = 40
} }
variable "disk_type" { variable "disk_type" {
type = string type = string
default = "gp2"
description = "Type of the EBS volume (e.g. standard, gp2, io1)" description = "Type of the EBS volume (e.g. standard, gp2, io1)"
default = "gp2"
} }
variable "disk_iops" { variable "disk_iops" {
type = string type = number
default = "0"
description = "IOPS of the EBS volume (e.g. 100)" description = "IOPS of the EBS volume (e.g. 100)"
default = 0
} }
variable "worker_price" { variable "worker_price" {
type = string type = number
default = "" description = "Spot price in USD for worker instances or 0 to use on-demand instances"
description = "Spot price in USD for autoscaling group spot instances. Leave as default empty string for autoscaling group to use on-demand instances. Note, switching in-place from spot to on-demand is not possible: https://github.com/terraform-providers/terraform-provider-aws/issues/4320" default = 0
} }
variable "worker_target_groups" { variable "worker_target_groups" {
@ -97,61 +97,53 @@ variable "ssh_authorized_key" {
} }
variable "asset_dir" { variable "asset_dir" {
description = "Path to a directory where generated assets should be placed (contains secrets)"
type = string type = string
description = "Absolute path to a directory where generated assets should be placed (contains secrets)"
} }
variable "networking" { variable "networking" {
description = "Choice of networking provider (calico or flannel)"
type = string type = string
description = "Choice of networking provider (calico or flannel)"
default = "calico" default = "calico"
} }
variable "network_mtu" { variable "network_mtu" {
type = number
description = "CNI interface MTU (applies to calico only). Use 8981 if using instances types with Jumbo frames." description = "CNI interface MTU (applies to calico only). Use 8981 if using instances types with Jumbo frames."
type = string default = 1480
default = "1480"
} }
variable "host_cidr" { variable "host_cidr" {
description = "CIDR IPv4 range to assign to EC2 nodes"
type = string type = string
description = "CIDR IPv4 range to assign to EC2 nodes"
default = "10.0.0.0/16" default = "10.0.0.0/16"
} }
variable "pod_cidr" { variable "pod_cidr" {
description = "CIDR IPv4 range to assign Kubernetes pods"
type = string type = string
description = "CIDR IPv4 range to assign Kubernetes pods"
default = "10.2.0.0/16" default = "10.2.0.0/16"
} }
variable "service_cidr" { variable "service_cidr" {
type = string
description = <<EOD description = <<EOD
CIDR IPv4 range to assign Kubernetes services. CIDR IPv4 range to assign Kubernetes services.
The 1st IP will be reserved for kube_apiserver, the 10th IP will be reserved for coredns. The 1st IP will be reserved for kube_apiserver, the 10th IP will be reserved for coredns.
EOD EOD
type = string
default = "10.3.0.0/16" default = "10.3.0.0/16"
} }
variable "cluster_domain_suffix" {
description = "Queries for domains with the suffix will be answered by coredns. Default is cluster.local (e.g. foo.default.svc.cluster.local) "
type = string
default = "cluster.local"
}
variable "enable_reporting" { variable "enable_reporting" {
type = string type = bool
description = "Enable usage or analytics reporting to upstreams (Calico)" description = "Enable usage or analytics reporting to upstreams (Calico)"
default = "false" default = false
} }
variable "enable_aggregation" { variable "enable_aggregation" {
type = bool
description = "Enable the Kubernetes Aggregation Layer (defaults to false)" description = "Enable the Kubernetes Aggregation Layer (defaults to false)"
type = string default = false
default = "false"
} }
variable "worker_node_labels" { variable "worker_node_labels" {
@ -160,3 +152,11 @@ variable "worker_node_labels" {
default = [] default = []
} }
# unofficial, undocumented, unsupported
variable "cluster_domain_suffix" {
type = string
description = "Queries for domains with the suffix will be answered by CoreDNS. Default is cluster.local (e.g. foo.default.svc.cluster.local)"
default = "cluster.local"
}

View File

@ -23,45 +23,45 @@ variable "security_groups" {
# instances # instances
variable "worker_count" { variable "worker_count" {
type = string type = number
default = "1"
description = "Number of instances" description = "Number of instances"
default = 1
} }
variable "instance_type" { variable "instance_type" {
type = string type = string
default = "t3.small"
description = "EC2 instance type" description = "EC2 instance type"
default = "t3.small"
} }
variable "os_image" { variable "os_image" {
type = string type = string
default = "coreos-stable"
description = "AMI channel for a Container Linux derivative (coreos-stable, coreos-beta, coreos-alpha, flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge)" description = "AMI channel for a Container Linux derivative (coreos-stable, coreos-beta, coreos-alpha, flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge)"
default = "coreos-stable"
} }
variable "disk_size" { variable "disk_size" {
type = string type = number
default = "40"
description = "Size of the EBS volume in GB" description = "Size of the EBS volume in GB"
default = 40
} }
variable "disk_type" { variable "disk_type" {
type = string type = string
default = "gp2"
description = "Type of the EBS volume (e.g. standard, gp2, io1)" description = "Type of the EBS volume (e.g. standard, gp2, io1)"
default = "gp2"
} }
variable "disk_iops" { variable "disk_iops" {
type = string type = number
default = "0"
description = "IOPS of the EBS volume (required for io1)" description = "IOPS of the EBS volume (required for io1)"
default = 0
} }
variable "spot_price" { variable "spot_price" {
type = string type = number
default = "" description = "Spot price in USD for worker instances or 0 to use on-demand instances"
description = "Spot price in USD for autoscaling group spot instances. Leave as default empty string for autoscaling group to use on-demand instances. Note, switching in-place from spot to on-demand is not possible: https://github.com/terraform-providers/terraform-provider-aws/issues/4320" default = 0
} }
variable "target_groups" { variable "target_groups" {
@ -89,19 +89,17 @@ variable "ssh_authorized_key" {
} }
variable "service_cidr" { variable "service_cidr" {
type = string
description = <<EOD description = <<EOD
CIDR IPv4 range to assign Kubernetes services. CIDR IPv4 range to assign Kubernetes services.
The 1st IP will be reserved for kube_apiserver, the 10th IP will be reserved for coredns. The 1st IP will be reserved for kube_apiserver, the 10th IP will be reserved for coredns.
EOD EOD
type = string
default = "10.3.0.0/16" default = "10.3.0.0/16"
} }
variable "cluster_domain_suffix" { variable "cluster_domain_suffix" {
description = "Queries for domains with the suffix will be answered by coredns. Default is cluster.local (e.g. foo.default.svc.cluster.local) "
type = string type = string
description = "Queries for domains with the suffix will be answered by coredns. Default is cluster.local (e.g. foo.default.svc.cluster.local) "
default = "cluster.local" default = "cluster.local"
} }

View File

@ -46,7 +46,7 @@ resource "aws_autoscaling_group" "workers" {
resource "aws_launch_configuration" "worker" { resource "aws_launch_configuration" "worker" {
image_id = local.ami_id image_id = local.ami_id
instance_type = var.instance_type instance_type = var.instance_type
spot_price = var.spot_price spot_price = var.spot_price > 0 ? var.spot_price : null
enable_monitoring = false enable_monitoring = false
user_data = data.ct_config.worker-ignition.rendered user_data = data.ct_config.worker-ignition.rendered

View File

@ -18,57 +18,57 @@ variable "dns_zone_id" {
# instances # instances
variable "controller_count" { variable "controller_count" {
type = string type = number
default = "1"
description = "Number of controllers (i.e. masters)" description = "Number of controllers (i.e. masters)"
default = 1
} }
variable "worker_count" { variable "worker_count" {
type = string type = number
default = "1"
description = "Number of workers" description = "Number of workers"
default = 1
} }
variable "controller_type" { variable "controller_type" {
type = string type = string
default = "t3.small"
description = "EC2 instance type for controllers" description = "EC2 instance type for controllers"
default = "t3.small"
} }
variable "worker_type" { variable "worker_type" {
type = string type = string
default = "t3.small"
description = "EC2 instance type for workers" description = "EC2 instance type for workers"
default = "t3.small"
} }
variable "os_image" { variable "os_image" {
type = string type = string
default = "coreos-stable"
description = "AMI channel for Fedora CoreOS (not yet used)" description = "AMI channel for Fedora CoreOS (not yet used)"
default = "coreos-stable"
} }
variable "disk_size" { variable "disk_size" {
type = string type = number
default = "40"
description = "Size of the EBS volume in GB" description = "Size of the EBS volume in GB"
default = 40
} }
variable "disk_type" { variable "disk_type" {
type = string type = string
default = "gp2"
description = "Type of the EBS volume (e.g. standard, gp2, io1)" description = "Type of the EBS volume (e.g. standard, gp2, io1)"
default = "gp2"
} }
variable "disk_iops" { variable "disk_iops" {
type = string type = number
default = "0"
description = "IOPS of the EBS volume (e.g. 100)" description = "IOPS of the EBS volume (e.g. 100)"
default = 0
} }
variable "worker_price" { variable "worker_price" {
type = string type = number
default = "" description = "Spot price in USD for worker instances or 0 to use on-demand instances"
description = "Spot price in USD for autoscaling group spot instances. Leave as default empty string for autoscaling group to use on-demand instances. Note, switching in-place from spot to on-demand is not possible: https://github.com/terraform-providers/terraform-provider-aws/issues/4320" default = 0
} }
variable "worker_target_groups" { variable "worker_target_groups" {
@ -97,61 +97,59 @@ variable "ssh_authorized_key" {
} }
variable "asset_dir" { variable "asset_dir" {
description = "Path to a directory where generated assets should be placed (contains secrets)"
type = string type = string
description = "Absolute path to a directory where generated assets should be placed (contains secrets)"
} }
variable "networking" { variable "networking" {
description = "Choice of networking provider (calico or flannel)"
type = string type = string
description = "Choice of networking provider (calico or flannel)"
default = "calico" default = "calico"
} }
variable "network_mtu" { variable "network_mtu" {
type = number
description = "CNI interface MTU (applies to calico only). Use 8981 if using instances types with Jumbo frames." description = "CNI interface MTU (applies to calico only). Use 8981 if using instances types with Jumbo frames."
type = string default = 1480
default = "1480"
} }
variable "host_cidr" { variable "host_cidr" {
description = "CIDR IPv4 range to assign to EC2 nodes"
type = string type = string
description = "CIDR IPv4 range to assign to EC2 nodes"
default = "10.0.0.0/16" default = "10.0.0.0/16"
} }
variable "pod_cidr" { variable "pod_cidr" {
description = "CIDR IPv4 range to assign Kubernetes pods"
type = string type = string
description = "CIDR IPv4 range to assign Kubernetes pods"
default = "10.2.0.0/16" default = "10.2.0.0/16"
} }
variable "service_cidr" { variable "service_cidr" {
type = string
description = <<EOD description = <<EOD
CIDR IPv4 range to assign Kubernetes services. CIDR IPv4 range to assign Kubernetes services.
The 1st IP will be reserved for kube_apiserver, the 10th IP will be reserved for coredns. The 1st IP will be reserved for kube_apiserver, the 10th IP will be reserved for coredns.
EOD EOD
type = string
default = "10.3.0.0/16" default = "10.3.0.0/16"
} }
variable "cluster_domain_suffix" { variable "cluster_domain_suffix" {
description = "Queries for domains with the suffix will be answered by coredns. Default is cluster.local (e.g. foo.default.svc.cluster.local) "
type = string type = string
description = "Queries for domains with the suffix will be answered by coredns. Default is cluster.local (e.g. foo.default.svc.cluster.local) "
default = "cluster.local" default = "cluster.local"
} }
variable "enable_reporting" { variable "enable_reporting" {
type = string type = bool
description = "Enable usage or analytics reporting to upstreams (Calico)" description = "Enable usage or analytics reporting to upstreams (Calico)"
default = "false" default = false
} }
variable "enable_aggregation" { variable "enable_aggregation" {
type = bool
description = "Enable the Kubernetes Aggregation Layer (defaults to false)" description = "Enable the Kubernetes Aggregation Layer (defaults to false)"
type = string default = false
default = "false"
} }
variable "worker_node_labels" { variable "worker_node_labels" {
@ -159,3 +157,12 @@ variable "worker_node_labels" {
description = "List of initial worker node labels" description = "List of initial worker node labels"
default = [] default = []
} }
# unofficial, undocumented, unsupported
variable "cluster_domain_suffix" {
type = string
description = "Queries for domains with the suffix will be answered by CoreDNS. Default is cluster.local (e.g. foo.default.svc.cluster.local)"
default = "cluster.local"
}

View File

@ -23,45 +23,45 @@ variable "security_groups" {
# instances # instances
variable "worker_count" { variable "worker_count" {
type = string type = number
default = "1"
description = "Number of instances" description = "Number of instances"
default = 1
} }
variable "instance_type" { variable "instance_type" {
type = string type = string
default = "t3.small"
description = "EC2 instance type" description = "EC2 instance type"
default = "t3.small"
} }
variable "os_image" { variable "os_image" {
type = string type = string
default = "coreos-stable"
description = "AMI channel for Fedora CoreOS (not yet used)" description = "AMI channel for Fedora CoreOS (not yet used)"
default = "coreos-stable"
} }
variable "disk_size" { variable "disk_size" {
type = string type = number
default = "40"
description = "Size of the EBS volume in GB" description = "Size of the EBS volume in GB"
default = 40
} }
variable "disk_type" { variable "disk_type" {
type = string type = string
default = "gp2"
description = "Type of the EBS volume (e.g. standard, gp2, io1)" description = "Type of the EBS volume (e.g. standard, gp2, io1)"
default = "gp2"
} }
variable "disk_iops" { variable "disk_iops" {
type = string type = number
default = "0"
description = "IOPS of the EBS volume (required for io1)" description = "IOPS of the EBS volume (required for io1)"
default = 0
} }
variable "spot_price" { variable "spot_price" {
type = string type = number
default = "" description = "Spot price in USD for worker instances or 0 to use on-demand instances"
description = "Spot price in USD for autoscaling group spot instances. Leave as default empty string for autoscaling group to use on-demand instances. Note, switching in-place from spot to on-demand is not possible: https://github.com/terraform-providers/terraform-provider-aws/issues/4320" default = 0
} }
variable "target_groups" { variable "target_groups" {
@ -89,19 +89,17 @@ variable "ssh_authorized_key" {
} }
variable "service_cidr" { variable "service_cidr" {
type = string
description = <<EOD description = <<EOD
CIDR IPv4 range to assign Kubernetes services. CIDR IPv4 range to assign Kubernetes services.
The 1st IP will be reserved for kube_apiserver, the 10th IP will be reserved for coredns. The 1st IP will be reserved for kube_apiserver, the 10th IP will be reserved for coredns.
EOD EOD
type = string
default = "10.3.0.0/16" default = "10.3.0.0/16"
} }
variable "cluster_domain_suffix" { variable "cluster_domain_suffix" {
description = "Queries for domains with the suffix will be answered by coredns. Default is cluster.local (e.g. foo.default.svc.cluster.local) "
type = string type = string
description = "Queries for domains with the suffix will be answered by coredns. Default is cluster.local (e.g. foo.default.svc.cluster.local) "
default = "cluster.local" default = "cluster.local"
} }

View File

@ -46,7 +46,7 @@ resource "aws_autoscaling_group" "workers" {
resource "aws_launch_configuration" "worker" { resource "aws_launch_configuration" "worker" {
image_id = data.aws_ami.fedora-coreos.image_id image_id = data.aws_ami.fedora-coreos.image_id
instance_type = var.instance_type instance_type = var.instance_type
spot_price = var.spot_price spot_price = var.spot_price > 0 ? var.spot_price : null
enable_monitoring = false enable_monitoring = false
user_data = data.ct_config.worker-ignition.rendered user_data = data.ct_config.worker-ignition.rendered

View File

@ -63,8 +63,10 @@ The AWS internal `workers` module supports a number of [variables](https://githu
| worker_count | Number of instances | 1 | 3 | | worker_count | Number of instances | 1 | 3 |
| instance_type | EC2 instance type | "t3.small" | "t3.medium" | | instance_type | EC2 instance type | "t3.small" | "t3.medium" |
| 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 disk in GB | 40 | 100 | | disk_size | Size of the EBS volume in GB | 40 | 100 |
| spot_price | Spot price in USD for workers. Leave as default empty string for regular on-demand instances | "" | "0.10" | | disk_type | Type of the EBS volume | "gp2" | standard, gp2, io1 |
| disk_iops | IOPS of the EBS volume | 0 (i.e. auto) | 400 |
| spot_price | Spot price in USD for worker instances or 0 to use on-demand instances | 0 | 0.10 |
| clc_snippets | Container Linux Config snippets | [] | [example](/advanced/customization/#usage) | | clc_snippets | Container Linux Config snippets | [] | [example](/advanced/customization/#usage) |
| service_cidr | Must match `service_cidr` of cluster | "10.3.0.0/16" | "10.3.0.0/24" | | service_cidr | Must match `service_cidr` of cluster | "10.3.0.0/16" | "10.3.0.0/24" |
| cluster_domain_suffix | Must match `cluster_domain_suffix` of cluster | "cluster.local" | "k8s.example.com" | | cluster_domain_suffix | Must match `cluster_domain_suffix` of cluster | "cluster.local" | "k8s.example.com" |

View File

@ -177,7 +177,7 @@ Check the [variables.tf](https://github.com/poseidon/typhoon/blob/master/aws/con
| dns_zone | AWS Route53 DNS zone | "aws.example.com" | | dns_zone | AWS Route53 DNS zone | "aws.example.com" |
| dns_zone_id | AWS Route53 DNS zone id | "Z3PAABBCFAKEC0" | | dns_zone_id | AWS Route53 DNS zone id | "Z3PAABBCFAKEC0" |
| ssh_authorized_key | SSH public key for user 'core' | "ssh-rsa AAAAB3NZ..." | | ssh_authorized_key | SSH public key for user 'core' | "ssh-rsa AAAAB3NZ..." |
| asset_dir | Path to a directory where generated assets should be placed (contains secrets) | "/home/user/.secrets/clusters/tempest" | | asset_dir | Absolute path to a directory where generated assets should be placed (contains secrets) | "/home/user/.secrets/clusters/tempest" |
#### DNS Zone #### DNS Zone
@ -191,7 +191,7 @@ resource "aws_route53_zone" "zone-for-clusters" {
} }
``` ```
Reference the DNS zone id with `"${aws_route53_zone.zone-for-clusters.zone_id}"`. Reference the DNS zone id with `aws_route53_zone.zone-for-clusters.zone_id`.
!!! tip "" !!! tip ""
If you have an existing domain name with a zone file elsewhere, just delegate a subdomain that can be managed on Route53 (e.g. aws.mydomain.com) and [update nameservers](http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html). If you have an existing domain name with a zone file elsewhere, just delegate a subdomain that can be managed on Route53 (e.g. aws.mydomain.com) and [update nameservers](http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html).
@ -205,12 +205,11 @@ Reference the DNS zone id with `"${aws_route53_zone.zone-for-clusters.zone_id}"`
| controller_type | EC2 instance type for controllers | "t3.small" | See below | | controller_type | EC2 instance type for controllers | "t3.small" | See below |
| worker_type | EC2 instance type for workers | "t3.small" | See below | | worker_type | EC2 instance type for workers | "t3.small" | See below |
| os_image | AMI channel for a Container Linux derivative | coreos-stable | coreos-stable, coreos-beta, coreos-alpha, flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge | | os_image | AMI channel for a Container Linux derivative | coreos-stable | coreos-stable, coreos-beta, coreos-alpha, flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge |
| 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" | | disk_iops | IOPS of the EBS volume | 0 (i.e. auto) | 400 |
| worker_target_groups | Target group ARNs to which worker instances should be added | [] | ["${aws_lb_target_group.app.id}"] | | worker_target_groups | Target group ARNs to which worker instances should be added | [] | [aws_lb_target_group.app.id] |
| worker_node_labels | List of initial worker node labels | [] | ["worker-pool=default"] | | worker_price | Spot price in USD for worker instances or 0 to use on-demand instances | 0/null | 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/) |
| networking | Choice of networking provider | "calico" | "calico" or "flannel" | | networking | Choice of networking provider | "calico" | "calico" or "flannel" |
@ -218,7 +217,7 @@ Reference the DNS zone id with `"${aws_route53_zone.zone-for-clusters.zone_id}"`
| host_cidr | CIDR IPv4 range to assign to EC2 instances | "10.0.0.0/16" | "10.1.0.0/16" | | host_cidr | CIDR IPv4 range to assign to EC2 instances | "10.0.0.0/16" | "10.1.0.0/16" |
| pod_cidr | CIDR IPv4 range to assign to Kubernetes pods | "10.2.0.0/16" | "10.22.0.0/16" | | pod_cidr | CIDR IPv4 range to assign to Kubernetes pods | "10.2.0.0/16" | "10.22.0.0/16" |
| service_cidr | CIDR IPv4 range to assign to Kubernetes services | "10.3.0.0/16" | "10.3.0.0/24" | | service_cidr | CIDR IPv4 range to assign to Kubernetes services | "10.3.0.0/16" | "10.3.0.0/24" |
| cluster_domain_suffix | FQDN suffix for Kubernetes services answered by coredns. | "cluster.local" | "k8s.example.com" | | worker_node_labels | List of initial worker node labels | [] | ["worker-pool=default"] |
Check the list of valid [instance types](https://aws.amazon.com/ec2/instance-types/). Check the list of valid [instance types](https://aws.amazon.com/ec2/instance-types/).

View File

@ -191,7 +191,7 @@ resource "aws_route53_zone" "zone-for-clusters" {
} }
``` ```
Reference the DNS zone id with `"${aws_route53_zone.zone-for-clusters.zone_id}"`. Reference the DNS zone id with `aws_route53_zone.zone-for-clusters.zone_id`.
!!! tip "" !!! tip ""
If you have an existing domain name with a zone file elsewhere, just delegate a subdomain that can be managed on Route53 (e.g. aws.mydomain.com) and [update nameservers](http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html). If you have an existing domain name with a zone file elsewhere, just delegate a subdomain that can be managed on Route53 (e.g. aws.mydomain.com) and [update nameservers](http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html).
@ -205,12 +205,11 @@ Reference the DNS zone id with `"${aws_route53_zone.zone-for-clusters.zone_id}"`
| controller_type | EC2 instance type for controllers | "t3.small" | See below | | controller_type | EC2 instance type for controllers | "t3.small" | See below |
| worker_type | EC2 instance type for workers | "t3.small" | See below | | worker_type | EC2 instance type for workers | "t3.small" | See below |
| os_image | AMI channel for Fedora CoreOS | not yet used | ? | | os_image | AMI channel for Fedora CoreOS | not yet used | ? |
| 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" | | disk_iops | IOPS of the EBS volume | 0 (i.e. auto) | 400 |
| worker_target_groups | Target group ARNs to which worker instances should be added | [] | ["${aws_lb_target_group.app.id}"] | | worker_target_groups | Target group ARNs to which worker instances should be added | [] | [aws_lb_target_group.app.id] |
| worker_node_labels | List of initial worker node labels | [] | ["worker-pool=default"] | | worker_price | Spot price in USD for worker instances or 0 to use on-demand instances | 0 | 0.10 |
| worker_price | Spot price in USD for workers. Leave as default empty string for regular on-demand instances | "" | "0.10" |
| controller_snippets | Controller Fedora CoreOS Config snippets | [] | UNSUPPORTED | | controller_snippets | Controller Fedora CoreOS Config snippets | [] | UNSUPPORTED |
| worker_clc_snippets | Worker Fedora CoreOS Config snippets | [] | UNSUPPORTED | | worker_clc_snippets | Worker Fedora CoreOS Config snippets | [] | UNSUPPORTED |
| networking | Choice of networking provider | "calico" | "calico" or "flannel" | | networking | Choice of networking provider | "calico" | "calico" or "flannel" |
@ -218,7 +217,7 @@ Reference the DNS zone id with `"${aws_route53_zone.zone-for-clusters.zone_id}"`
| host_cidr | CIDR IPv4 range to assign to EC2 instances | "10.0.0.0/16" | "10.1.0.0/16" | | host_cidr | CIDR IPv4 range to assign to EC2 instances | "10.0.0.0/16" | "10.1.0.0/16" |
| pod_cidr | CIDR IPv4 range to assign to Kubernetes pods | "10.2.0.0/16" | "10.22.0.0/16" | | pod_cidr | CIDR IPv4 range to assign to Kubernetes pods | "10.2.0.0/16" | "10.22.0.0/16" |
| service_cidr | CIDR IPv4 range to assign to Kubernetes services | "10.3.0.0/16" | "10.3.0.0/24" | | service_cidr | CIDR IPv4 range to assign to Kubernetes services | "10.3.0.0/16" | "10.3.0.0/24" |
| cluster_domain_suffix | FQDN suffix for Kubernetes services answered by coredns. | "cluster.local" | "k8s.example.com" | | worker_node_labels | List of initial worker node labels | [] | ["worker-pool=default"] |
Check the list of valid [instance types](https://aws.amazon.com/ec2/instance-types/). Check the list of valid [instance types](https://aws.amazon.com/ec2/instance-types/).