diff --git a/aws/container-linux/kubernetes/variables.tf b/aws/container-linux/kubernetes/variables.tf index 9dcf980e..b2b423e2 100644 --- a/aws/container-linux/kubernetes/variables.tf +++ b/aws/container-linux/kubernetes/variables.tf @@ -1,21 +1,44 @@ variable "cluster_name" { type = "string" - description = "Cluster name" + description = "Unique cluster name (prepended to dns_zone)" } +# AWS + variable "dns_zone" { type = "string" - description = "AWS DNS Zone (e.g. aws.dghubble.io)" + description = "AWS Route53 DNS Zone (e.g. aws.example.com)" } variable "dns_zone_id" { type = "string" - description = "AWS DNS Zone ID (e.g. Z3PAABBCFAKEC0)" + description = "AWS Route53 DNS Zone ID (e.g. Z3PAABBCFAKEC0)" } -variable "ssh_authorized_key" { +# instances + +variable "controller_count" { type = "string" - description = "SSH public key for user 'core'" + default = "1" + description = "Number of controllers (i.e. masters)" +} + +variable "worker_count" { + type = "string" + default = "1" + description = "Number of workers" +} + +variable "controller_type" { + type = "string" + default = "t2.small" + description = "EC2 instance type for controllers" +} + +variable "worker_type" { + type = "string" + default = "t2.small" + description = "EC2 instance type for workers" } variable "os_channel" { @@ -27,37 +50,7 @@ variable "os_channel" { variable "disk_size" { type = "string" default = "40" - description = "The size of the disk in Gigabytes" -} - -variable "host_cidr" { - description = "CIDR IPv4 range to assign to EC2 nodes" - type = "string" - default = "10.0.0.0/16" -} - -variable "controller_count" { - type = "string" - default = "1" - description = "Number of controllers" -} - -variable "controller_type" { - type = "string" - default = "t2.small" - description = "Controller EC2 instance type" -} - -variable "worker_count" { - type = "string" - default = "1" - description = "Number of workers" -} - -variable "worker_type" { - type = "string" - default = "t2.small" - description = "Worker EC2 instance type" + description = "Size of the EBS volume in GB" } variable "controller_clc_snippets" { @@ -72,7 +65,12 @@ variable "worker_clc_snippets" { default = [] } -# bootkube assets +# configuration + +variable "ssh_authorized_key" { + type = "string" + description = "SSH public key for user 'core'" +} variable "asset_dir" { description = "Path to a directory where generated assets should be placed (contains secrets)" @@ -91,6 +89,12 @@ variable "network_mtu" { default = "1480" } +variable "host_cidr" { + description = "CIDR IPv4 range to assign to EC2 nodes" + type = "string" + default = "10.0.0.0/16" +} + variable "pod_cidr" { description = "CIDR IPv4 range to assign Kubernetes pods" type = "string" diff --git a/aws/container-linux/kubernetes/workers/variables.tf b/aws/container-linux/kubernetes/workers/variables.tf index ac49bc65..415be285 100644 --- a/aws/container-linux/kubernetes/workers/variables.tf +++ b/aws/container-linux/kubernetes/workers/variables.tf @@ -1,21 +1,23 @@ variable "name" { type = "string" - description = "Unique name instance group" + description = "Unique name for the worker pool" } +# AWS + variable "vpc_id" { type = "string" - description = "ID of the VPC for creating instances" + description = "Must be set to `vpc_id` output by cluster" } variable "subnet_ids" { type = "list" - description = "List of subnet IDs for creating instances" + description = "Must be set to `subnet_ids` output by cluster" } variable "security_groups" { type = "list" - description = "List of security group IDs" + description = "Must be set to `worker_security_groups` output by cluster" } # instances @@ -41,14 +43,20 @@ variable "os_channel" { variable "disk_size" { type = "string" default = "40" - description = "Size of the disk in GB" + description = "Size of the EBS volume in GB" +} + +variable "clc_snippets" { + type = "list" + description = "Container Linux Config snippets" + default = [] } # configuration variable "kubeconfig" { type = "string" - description = "Generated Kubelet kubeconfig" + description = "Must be set to `kubeconfig` output by cluster" } variable "ssh_authorized_key" { @@ -71,9 +79,3 @@ variable "cluster_domain_suffix" { type = "string" default = "cluster.local" } - -variable "clc_snippets" { - type = "list" - description = "Container Linux Config snippets" - default = [] -} diff --git a/bare-metal/container-linux/kubernetes/variables.tf b/bare-metal/container-linux/kubernetes/variables.tf index ace976df..7f74e8ae 100644 --- a/bare-metal/container-linux/kubernetes/variables.tf +++ b/bare-metal/container-linux/kubernetes/variables.tf @@ -1,3 +1,10 @@ +variable "cluster_name" { + type = "string" + description = "Unique cluster name" +} + +# bare-metal + variable "matchbox_http_endpoint" { type = "string" description = "Matchbox HTTP read-only endpoint (e.g. http://matchbox.example.com:8080)" @@ -13,17 +20,7 @@ variable "container_linux_version" { description = "Container Linux version of the kernel/initrd to PXE or the image to install" } -variable "cluster_name" { - type = "string" - description = "Cluster name" -} - -variable "ssh_authorized_key" { - type = "string" - description = "SSH public key to set as an authorized_key on machines" -} - -# Machines +# machines # Terraform's crude "type system" does not properly support lists of maps so we do this. variable "controller_names" { @@ -50,13 +47,18 @@ variable "worker_domains" { type = "list" } -# bootkube assets +# configuration variable "k8s_domain_name" { description = "Controller DNS name which resolves to a controller instance. Workers and kubeconfig's will communicate with this endpoint (e.g. cluster.example.com)" type = "string" } +variable "ssh_authorized_key" { + type = "string" + description = "SSH public key for user 'core'" +} + variable "asset_dir" { description = "Path to a directory where generated assets should be placed (contains secrets)" type = "string" @@ -75,14 +77,14 @@ variable "network_mtu" { } variable "pod_cidr" { - description = "CIDR IP range to assign Kubernetes pods" + description = "CIDR IPv4 range to assign Kubernetes pods" type = "string" default = "10.2.0.0/16" } variable "service_cidr" { description = <