forked from poseidon/terraform-render-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
157 lines (139 loc) · 3.73 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
variable "cluster_name" {
type = string
description = "Cluster name"
}
variable "api_servers" {
type = list(string)
description = "List of URLs used to reach kube-apiserver"
}
variable "etcd_servers" {
type = list(string)
description = "List of URLs used to reach etcd servers."
}
# optional
variable "networking" {
type = string
description = "Choice of networking provider (flannel or calico or cilium or none)"
default = "flannel"
validation {
condition = contains(["flannel", "calico", "cilium", "none"], var.networking)
error_message = "The networking option must be set to either flannel, calico, cilium, or none."
}
}
variable "network_mtu" {
type = number
description = "CNI interface MTU (only applies to calico)"
default = 1500
}
variable "network_encapsulation" {
type = string
description = "Network encapsulation mode ipip, vxlan or never (only applies to calico)"
default = "ipip"
}
variable "network_ip_autodetection_method" {
type = string
description = "Method to autodetect the host IPv4 address (only applies to calico)"
default = "first-found"
}
variable "pod_cidr" {
type = string
description = "CIDR IP range to assign Kubernetes pods"
default = "10.2.0.0/16"
}
variable "service_cidr" {
type = string
description = <<EOD
CIDR IP range to assign Kubernetes services.
The 1st IP will be reserved for kube_apiserver, the 10th IP will be reserved for kube-dns.
EOD
default = "10.3.0.0/24"
}
variable "container_images" {
type = map(string)
description = "Container images to use"
}
variable "enable_reporting" {
type = bool
description = "Enable usage or analytics reporting to upstream component owners (Tigera: Calico)"
default = false
}
variable "enable_aggregation" {
type = bool
description = "Enable the Kubernetes Aggregation Layer (defaults to true)"
default = true
}
variable "daemonset_tolerations" {
type = list(string)
description = "List of additional taint keys kube-system DaemonSets should tolerate (e.g. ['custom-role', 'gpu-role'])"
default = []
}
# unofficial, temporary, may be removed without notice
variable "external_apiserver_port" {
type = number
description = "External kube-apiserver port (e.g. 6443 to match internal kube-apiserver port)"
default = 6443
}
variable "cluster_domain_suffix" {
type = string
description = "Queries for domains with the suffix will be answered by kube-dns"
default = "cluster.local"
}
variable "components" {
description = "Configure pre-installed cluster components"
type = object({
enable = optional(bool, true)
coredns = optional(
object({
enable = optional(bool, true)
}),
{
enable = true
}
)
kube_proxy = optional(
object({
enable = optional(bool, true)
}),
{
enable = true
}
)
# CNI providers are enabled for pre-install by default, but only the
# provider matching var.networking is actually installed.
flannel = optional(
object({
enable = optional(bool, true)
}),
{
enable = true
}
)
calico = optional(
object({
enable = optional(bool, true)
}),
{
enable = true
}
)
cilium = optional(
object({
enable = optional(bool, true)
}),
{
enable = true
}
)
})
default = {
enable = true
coredns = null
kube_proxy = null
flannel = null
calico = null
cilium = null
}
# Set the variable value to the default value when the caller
# sets it to null.
nullable = false
}