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
|
|
|
|
|
2024-07-09 06:20:46 +02:00
|
|
|
variable "location" {
|
2019-05-28 06:43:08 +02:00
|
|
|
type = string
|
2024-07-09 06:20:46 +02:00
|
|
|
description = "Must be set to the Azure location of cluster"
|
2018-08-20 03:48:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
2024-07-06 02:21:50 +02:00
|
|
|
variable "backend_address_pool_ids" {
|
|
|
|
type = object({
|
|
|
|
ipv4 = list(string)
|
|
|
|
ipv6 = list(string)
|
|
|
|
})
|
|
|
|
description = "Must be set to the `backend_address_pool_ids` output by cluster"
|
2018-08-20 03:48:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# 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`)"
|
2022-10-13 18:47:45 +02:00
|
|
|
default = "Standard_D2as_v5"
|
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
|
|
|
}
|
|
|
|
|
2024-07-09 16:53:41 +02:00
|
|
|
variable "disk_type" {
|
|
|
|
type = string
|
|
|
|
description = "Type of managed disk"
|
|
|
|
default = "Standard_LRS"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "disk_size" {
|
|
|
|
type = number
|
|
|
|
description = "Size of the managed disk in GB"
|
|
|
|
default = 30
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "ephemeral_disk" {
|
|
|
|
type = bool
|
|
|
|
description = "Use ephemeral local disk instead of managed disk (requires vm_type with local storage)"
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
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'"
|
|
|
|
}
|
|
|
|
|
2023-09-17 23:21:42 +02:00
|
|
|
variable "azure_authorized_key" {
|
|
|
|
type = string
|
|
|
|
description = "Optionally, pass a dummy RSA key to satisfy Azure validations (then use an ed25519 key set above)"
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2018-08-20 03:48:22 +02:00
|
|
|
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 = []
|
|
|
|
}
|
|
|
|
|
2022-10-14 05:49:01 +02:00
|
|
|
variable "arch" {
|
|
|
|
type = string
|
|
|
|
description = "Container architecture (amd64 or arm64)"
|
|
|
|
default = "amd64"
|
|
|
|
|
|
|
|
validation {
|
|
|
|
condition = var.arch == "amd64" || var.arch == "arm64"
|
|
|
|
error_message = "The arch must be amd64 or arm64."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|