2018-08-20 03:48:22 +02:00
|
|
|
variable "name" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Unique name for the worker pool"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Azure
|
|
|
|
|
|
|
|
variable "region" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Must be set to the Azure Region of cluster"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "resource_group_name" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Must be set to the resource group name of cluster"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "subnet_id" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Must be set to the `worker_subnet_id` output by cluster"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "security_group_id" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Must be set to the `worker_security_group_id` output by cluster"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "backend_address_pool_id" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Must be set to the `worker_backend_address_pool_id` output by cluster"
|
|
|
|
}
|
|
|
|
|
|
|
|
# instances
|
|
|
|
|
2019-05-28 01:33:21 +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 instances"
|
2019-10-01 07:18:15 +02:00
|
|
|
default = 1
|
2018-08-20 03:48:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_type" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Machine type for instances (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
|
2021-02-21 00:36:52 +01:00
|
|
|
description = "Channel for a Container Linux derivative (flatcar-stable, flatcar-beta, flatcar-alpha)"
|
2020-04-11 23:52:30 +02:00
|
|
|
default = "flatcar-stable"
|
2020-11-17 20:30:01 +01:00
|
|
|
|
|
|
|
validation {
|
2021-02-21 00:36:52 +01:00
|
|
|
condition = contains(["flatcar-stable", "flatcar-beta", "flatcar-alpha"], var.os_image)
|
|
|
|
error_message = "The os_image must be flatcar-stable, flatcar-beta, or flatcar-alpha."
|
2020-11-17 20:30:01 +01:00
|
|
|
}
|
2018-08-20 03:48:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "priority" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2020-04-13 00:49:48 +02:00
|
|
|
description = "Set priority to Spot to use reduced cost surplus capacity, with the tradeoff that instances can be evicted 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 "snippets" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = list(string)
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Container Linux Config snippets"
|
|
|
|
default = []
|
|
|
|
}
|
|
|
|
|
|
|
|
# configuration
|
|
|
|
|
|
|
|
variable "kubeconfig" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2018-08-20 03:48:22 +02:00
|
|
|
description = "Must be set to `kubeconfig` output by cluster"
|
|
|
|
}
|
|
|
|
|
|
|
|
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'"
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2019-10-01 07:18:15 +02:00
|
|
|
variable "node_labels" {
|
2019-11-14 08:44:02 +01:00
|
|
|
type = list(string)
|
2019-10-01 07:18:15 +02:00
|
|
|
description = "List of initial node labels"
|
2019-11-14 08:44:02 +01:00
|
|
|
default = []
|
2019-10-01 07:18:15 +02:00
|
|
|
}
|
|
|
|
|
2021-04-11 21:08:56 +02:00
|
|
|
variable "node_taints" {
|
|
|
|
type = list(string)
|
|
|
|
description = "List of initial node taints"
|
|
|
|
default = []
|
|
|
|
}
|
|
|
|
|
2019-10-01 07:18:15 +02:00
|
|
|
# unofficial, undocumented, unsupported
|
|
|
|
|
2018-08-20 03:48:22 +02:00
|
|
|
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) "
|
2019-11-14 08:44:02 +01:00
|
|
|
type = string
|
|
|
|
default = "cluster.local"
|
2018-08-20 03:48:22 +02:00
|
|
|
}
|
2019-05-28 06:43:08 +02:00
|
|
|
|