-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
65 lines (57 loc) · 2.07 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
variable "cluster_name" {
description = "Cluster name to create k8s cluster in Docker and set kubeconfig, You can use this cluster name select context with kubectl."
type = string
}
variable "node_image" {
description = "Change base image for kubernetes cluster, This parameter allow you to use local build image."
type = string
default = "kindest/node"
}
variable "kubernetes_version" {
description = "Specific kubernetes version to create cluster, Must specific in SemVer version. (Check all supported version -> https://hub.docker.com/r/kindest/node/tags)"
type = string
default = "1.21.14"
validation {
condition = can(regex("^((([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)$", var.kubernetes_version))
error_message = "Use SemVer to specific kubernetes version (Check all supported version -> https://hub.docker.com/r/kindest/node/tags)?"
}
}
variable "nodes" {
description = "Nodes information to create cluster with control plan and worker. Default is AIO node."
type = list(object({
role = string
kubeadm_config_patches = list(string)
extra_port_mappings = object({
listen_address = string
container_port = string
host_port = string
protocol = string
})
}))
default = []
}
variable "enable_loadbalancer" {
description = "Set to true to enable loadbalance for kind cluster."
type = bool
default = false
}
variable "enable_metrics_server" {
description = "Set to true to install metrics server into cluster."
type = bool
default = false
}
variable "enable_registry" {
description = "Set to true to install image registry as docker container."
type = bool
default = false
}
variable "registry_port" {
description = "Port of registry container."
type = number
default = 5000
}
variable "containerd_config_patches" {
description = "Path config to existing default for containerd."
type = list(string)
default = []
}