2022-01-13 10:01:59 +01:00
|
|
|
variable "hcloud_token" {
|
2022-01-13 18:34:53 +01:00
|
|
|
description = "Hetzner Cloud API Token"
|
2022-01-13 10:01:59 +01:00
|
|
|
type = string
|
2022-01-13 18:34:53 +01:00
|
|
|
sensitive = true
|
2022-01-13 10:01:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "public_key" {
|
|
|
|
description = "SSH public Key."
|
|
|
|
type = string
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "private_key" {
|
|
|
|
description = "SSH private Key."
|
|
|
|
type = string
|
|
|
|
}
|
|
|
|
|
2022-02-19 15:12:04 +01:00
|
|
|
variable "additional_public_keys" {
|
|
|
|
description = "Additional SSH public Keys. Use them to grant other team members root access to your cluster nodes"
|
|
|
|
type = list(string)
|
|
|
|
default = []
|
|
|
|
}
|
|
|
|
|
2022-01-29 21:02:00 +01:00
|
|
|
variable "network_region" {
|
|
|
|
description = "Default region for network"
|
|
|
|
type = string
|
|
|
|
}
|
|
|
|
|
2022-04-06 20:38:24 +02:00
|
|
|
variable "load_balancer_location" {
|
|
|
|
description = "Default load balancer location"
|
2022-01-13 10:01:59 +01:00
|
|
|
type = string
|
|
|
|
}
|
|
|
|
|
2022-02-26 12:10:50 +01:00
|
|
|
variable "load_balancer_type" {
|
2022-01-13 10:01:59 +01:00
|
|
|
description = "Default load balancer server type"
|
|
|
|
type = string
|
|
|
|
}
|
|
|
|
|
2022-02-26 12:10:50 +01:00
|
|
|
variable "load_balancer_disable_ipv6" {
|
2022-01-25 15:05:29 +01:00
|
|
|
description = "Disable ipv6 for the load balancer"
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
2022-04-06 20:38:24 +02:00
|
|
|
variable "control_plane_nodepools" {
|
|
|
|
description = "Number of control plane nodes."
|
|
|
|
type = list(any)
|
|
|
|
default = []
|
|
|
|
}
|
|
|
|
|
2022-02-23 16:46:46 +01:00
|
|
|
variable "agent_nodepools" {
|
2022-01-13 10:01:59 +01:00
|
|
|
description = "Number of agent nodes."
|
2022-03-09 03:15:15 +01:00
|
|
|
type = list(any)
|
|
|
|
default = []
|
2022-01-13 10:01:59 +01:00
|
|
|
}
|
2022-01-13 13:32:17 +01:00
|
|
|
|
|
|
|
variable "hetzner_ccm_version" {
|
|
|
|
type = string
|
|
|
|
default = null
|
|
|
|
description = "Version of Kubernetes Cloud Controller Manager for Hetzner Cloud"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "hetzner_csi_version" {
|
|
|
|
type = string
|
|
|
|
default = null
|
|
|
|
description = "Version of Container Storage Interface driver for Hetzner Cloud"
|
|
|
|
}
|
2022-01-15 09:04:21 +01:00
|
|
|
|
2022-05-02 16:03:15 +02:00
|
|
|
variable "kured_version" {
|
|
|
|
type = string
|
|
|
|
default = null
|
|
|
|
description = "Version of Kured"
|
|
|
|
}
|
|
|
|
|
2022-03-11 12:17:48 +01:00
|
|
|
variable "traefik_enabled" {
|
|
|
|
type = bool
|
2022-03-13 21:42:07 +01:00
|
|
|
default = true
|
2022-03-11 12:17:48 +01:00
|
|
|
description = "Whether to enable or disbale k3s traefik installation"
|
|
|
|
}
|
|
|
|
|
2022-02-01 23:32:10 +01:00
|
|
|
variable "traefik_acme_tls" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
2022-02-07 16:09:46 +01:00
|
|
|
description = "Whether to include the TLS configuration with the Traefik configuration"
|
2022-02-01 23:32:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "traefik_acme_email" {
|
|
|
|
type = string
|
|
|
|
default = false
|
|
|
|
description = "Email used to recieved expiration notice for certificate"
|
|
|
|
}
|
|
|
|
|
2022-02-07 16:09:46 +01:00
|
|
|
variable "allow_scheduling_on_control_plane" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
description = "Whether to allow non-control-plane workloads to run on the control-plane nodes"
|
|
|
|
}
|
2022-02-16 03:18:40 +01:00
|
|
|
|
2022-03-21 21:29:41 +01:00
|
|
|
variable "metrics_server_enabled" {
|
2022-03-11 12:17:48 +01:00
|
|
|
type = bool
|
|
|
|
default = true
|
|
|
|
description = "Whether to enable or disbale k3s mertric server"
|
|
|
|
}
|
|
|
|
|
2022-02-23 21:35:42 +01:00
|
|
|
variable "initial_k3s_channel" {
|
2022-02-16 03:18:40 +01:00
|
|
|
type = string
|
|
|
|
default = "stable"
|
2022-02-23 21:35:42 +01:00
|
|
|
description = "Allows you to specify an initial k3s channel"
|
|
|
|
|
|
|
|
validation {
|
2022-04-26 23:49:28 +02:00
|
|
|
condition = contains(["stable", "latest", "testing", "v1.16", "v1.17", "v1.18", "v1.19", "v1.20", "v1.21", "v1.22", "v1.23"], var.initial_k3s_channel)
|
2022-02-23 21:35:42 +01:00
|
|
|
error_message = "The initial k3s channel must be one of stable, latest or testing."
|
|
|
|
}
|
2022-02-16 03:18:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "automatically_upgrade_k3s" {
|
|
|
|
type = bool
|
|
|
|
default = true
|
|
|
|
description = "Whether to automatically upgrade k3s based on the selected channel"
|
|
|
|
}
|
2022-02-27 23:15:46 +01:00
|
|
|
|
|
|
|
variable "extra_firewall_rules" {
|
|
|
|
type = list(any)
|
|
|
|
default = []
|
|
|
|
description = "Additional firewall rules to apply to the cluster"
|
|
|
|
}
|
2022-03-05 04:02:09 +01:00
|
|
|
|
|
|
|
variable "use_cluster_name_in_node_name" {
|
|
|
|
type = bool
|
2022-03-05 04:10:29 +01:00
|
|
|
default = true
|
2022-03-05 04:02:09 +01:00
|
|
|
description = "Whether to use the cluster name in the node name"
|
|
|
|
}
|
2022-03-05 05:33:29 +01:00
|
|
|
|
2022-03-09 05:19:06 +01:00
|
|
|
variable "cluster_name" {
|
2022-03-05 05:33:29 +01:00
|
|
|
type = string
|
|
|
|
default = "k3s"
|
2022-03-09 05:19:06 +01:00
|
|
|
description = "Name of the cluster"
|
|
|
|
|
|
|
|
validation {
|
|
|
|
condition = can(regex("^[a-z1-9\\-]+$", var.cluster_name))
|
|
|
|
error_message = "The cluster name must be in the form of lowercase alphanumeric characters and/or dashes."
|
|
|
|
}
|
2022-03-05 05:33:29 +01:00
|
|
|
}
|
2022-03-06 21:39:39 +01:00
|
|
|
|
2022-03-05 10:59:20 +01:00
|
|
|
variable "traefik_additional_options" {
|
2022-03-04 15:02:54 +01:00
|
|
|
type = list(string)
|
|
|
|
default = []
|
2022-04-13 09:29:29 +02:00
|
|
|
}
|
2022-03-06 21:39:39 +01:00
|
|
|
|
2022-04-13 09:29:29 +02:00
|
|
|
variable "placement_group_disable" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
description = "Whether to disable placement groups"
|
2022-03-04 15:02:54 +01:00
|
|
|
}
|
2022-04-02 22:45:41 +02:00
|
|
|
|
2022-04-09 19:20:20 +02:00
|
|
|
variable "disable_network_policy" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
description = "Disable k3s default network policy controller (default false, automatically true for calico)"
|
|
|
|
}
|
|
|
|
|
2022-04-02 22:45:41 +02:00
|
|
|
variable "cni_plugin" {
|
|
|
|
type = string
|
|
|
|
default = "flannel"
|
|
|
|
description = "CNI plugin for k3s"
|
|
|
|
}
|
2022-05-02 16:21:18 +02:00
|
|
|
|
|
|
|
variable "enable_longhorn" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
description = "Enable Longhorn"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "disable_hetzner_csi" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
description = "Disable hetzner csi driver"
|
|
|
|
}
|