2018-08-20 03:48:22 +02:00
|
|
|
variable "cluster_name" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Unique cluster name (prepended to dns_zone)"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Azure
|
|
|
|
|
|
|
|
variable "region" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Azure Region (e.g. centralus , see `az account list-locations --output table`)"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "dns_zone" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Azure DNS Zone (e.g. azure.example.com)"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "dns_zone_group" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Resource group where the Azure DNS Zone resides (e.g. global)"
|
|
|
|
}
|
|
|
|
|
|
|
|
# instances
|
|
|
|
|
|
|
|
variable "controller_count" {
|
2019-10-01 07:18:15 +02:00
|
|
|
type = number
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Number of controllers (i.e. masters)"
|
2019-10-01 07:18:15 +02:00
|
|
|
default = 1
|
2018-08-20 03:48:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "worker_count" {
|
2019-10-01 07:18:15 +02:00
|
|
|
type = number
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Number of workers"
|
2019-10-01 07:18:15 +02:00
|
|
|
default = 1
|
2018-08-20 03:48:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "controller_type" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Machine type for controllers (see `az vm list-skus --location centralus`)"
|
2019-10-01 07:18:15 +02:00
|
|
|
default = "Standard_B2s"
|
2018-08-20 03:48:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "worker_type" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Machine type for workers (see `az vm list-skus --location centralus`)"
|
2019-10-01 07:18:15 +02:00
|
|
|
default = "Standard_DS1_v2"
|
2018-08-20 03:48:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "os_image" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2020-09-25 04:55:32 +02:00
|
|
|
description = "Channel for a Container Linux derivative (flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge)"
|
2020-05-10 02:37:35 +02:00
|
|
|
default = "flatcar-stable"
|
2020-11-17 20:30:01 +01:00
|
|
|
|
|
|
|
validation {
|
|
|
|
condition = contains(["flatcar-stable", "flatcar-beta", "flatcar-alpha", "flatcar-edge"], var.os_image)
|
|
|
|
error_message = "The os_image must be flatcar-stable, flatcar-beta, flatcar-alpha, or flatcar-edge."
|
|
|
|
}
|
2018-08-20 03:48:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "disk_size" {
|
2019-10-01 07:18:15 +02:00
|
|
|
type = number
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Size of the disk in GB"
|
2019-10-01 07:18:15 +02:00
|
|
|
default = 40
|
2018-08-20 03:48:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "worker_priority" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2020-04-13 00:49:48 +02:00
|
|
|
description = "Set worker priority to Spot to use reduced cost surplus capacity, with the tradeoff that instances can be deallocated at any time."
|
2019-10-01 07:18:15 +02:00
|
|
|
default = "Regular"
|
2018-08-20 03:48:22 +02:00
|
|
|
}
|
|
|
|
|
2020-03-29 20:46:22 +02:00
|
|
|
variable "controller_snippets" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = list(string)
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Controller Container Linux Config snippets"
|
|
|
|
default = []
|
|
|
|
}
|
|
|
|
|
2020-03-29 20:46:22 +02:00
|
|
|
variable "worker_snippets" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = list(string)
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Worker Container Linux Config snippets"
|
|
|
|
default = []
|
|
|
|
}
|
|
|
|
|
|
|
|
# configuration
|
|
|
|
|
|
|
|
variable "ssh_authorized_key" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "SSH public key for user 'core'"
|
|
|
|
}
|
|
|
|
|
2019-05-06 09:38:23 +02:00
|
|
|
variable "networking" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2019-10-01 07:18:15 +02:00
|
|
|
description = "Choice of networking provider (flannel or calico)"
|
2019-10-16 08:09:41 +02:00
|
|
|
default = "calico"
|
2019-05-06 09:38:23 +02:00
|
|
|
}
|
|
|
|
|
2018-08-20 03:48:22 +02:00
|
|
|
variable "host_cidr" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2019-10-01 07:18:15 +02:00
|
|
|
description = "CIDR IPv4 range to assign to instances"
|
2018-08-20 03:48:22 +02:00
|
|
|
default = "10.0.0.0/16"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "pod_cidr" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2019-10-01 07:18:15 +02:00
|
|
|
description = "CIDR IPv4 range to assign Kubernetes pods"
|
2018-08-20 03:48:22 +02:00
|
|
|
default = "10.2.0.0/16"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "service_cidr" {
|
2019-11-14 08:44:02 +01:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = <<EOD
|
|
|
|
CIDR IPv4 range to assign Kubernetes services.
|
|
|
|
The 1st IP will be reserved for kube_apiserver, the 10th IP will be reserved for coredns.
|
|
|
|
EOD
|
2019-11-14 08:44:02 +01:00
|
|
|
default = "10.3.0.0/16"
|
2018-08-20 03:48:22 +02:00
|
|
|
}
|
|
|
|
|
2018-11-20 07:45:02 +01:00
|
|
|
variable "enable_reporting" {
|
2019-11-14 08:44:02 +01:00
|
|
|
type = bool
|
2018-11-20 07:45:02 +01:00
|
|
|
description = "Enable usage or analytics reporting to upstreams (Calico)"
|
2019-11-14 08:44:02 +01:00
|
|
|
default = false
|
2018-11-20 07:45:02 +01:00
|
|
|
}
|
2019-04-07 11:29:07 +02:00
|
|
|
|
|
|
|
variable "enable_aggregation" {
|
2019-11-14 08:44:02 +01:00
|
|
|
type = bool
|
2019-04-07 11:29:07 +02:00
|
|
|
description = "Enable the Kubernetes Aggregation Layer (defaults to false)"
|
2019-11-14 08:44:02 +01:00
|
|
|
default = false
|
2019-04-07 11:29:07 +02:00
|
|
|
}
|
2019-05-28 06:43:08 +02:00
|
|
|
|
2019-09-28 23:59:24 +02:00
|
|
|
variable "worker_node_labels" {
|
2019-11-14 08:44:02 +01:00
|
|
|
type = list(string)
|
2019-09-29 00:01:14 +02:00
|
|
|
description = "List of initial worker node labels"
|
2019-11-14 08:44:02 +01:00
|
|
|
default = []
|
2019-09-28 23:59:24 +02:00
|
|
|
}
|
|
|
|
|
2019-10-01 07:18:15 +02:00
|
|
|
# unofficial, undocumented, unsupported
|
|
|
|
|
|
|
|
variable "cluster_domain_suffix" {
|
2019-11-14 08:44:02 +01:00
|
|
|
type = string
|
2019-10-01 07:18:15 +02:00
|
|
|
description = "Queries for domains with the suffix will be answered by coredns. Default is cluster.local (e.g. foo.default.svc.cluster.local) "
|
2019-11-14 08:44:02 +01:00
|
|
|
default = "cluster.local"
|
2019-10-01 07:18:15 +02:00
|
|
|
}
|
|
|
|
|