-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
executable file
·290 lines (250 loc) · 7.17 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
variable "ha_control_plane" {
description = "Set HA for K3S control plane.If HA true then 3 master nodes are provisioned."
type = bool
default = false
}
variable "cluster_name" {
description = "Cluster name."
type = string
default = "default-cluster"
}
variable "masters" {
description = "Master nodes configuration options"
type = object({
node = optional(string, "")
pool = optional(string, null)
cores = optional(number, 1)
memory = optional(number, 2048)
bridge = optional(string, "vmbr0")
tag = optional(number, -1)
tags = optional(list(string), ["terraform-managed-master"])
scsihw = optional(string, "virtio-scsi-pci")
disks = optional(list(object({
id = optional(number, 0)
size = optional(string, "10G")
storage = optional(string, "local-lvm")
type = optional(string, "virtio")
discard = optional(string, null)
ssd = optional(number, 0) })), [
{
id = 0
size = "10G"
}])
image = string
ssh_user = string
user_password = string
ssh_keys = string
subnet = string
gw = string
master_start_index = optional(string, "")
})
}
variable "proxmox_nodes" {
description = "List of proxmox nodes availiable for k3s nodes setup."
type = list(string)
}
variable "pools" {
description = "Worker pools configuration options"
type = list(object({
name = string
workers = optional(number, 1)
node = optional(string, "")
pool = optional(string, null)
cores = optional(number, 1)
memory = optional(number, 2048)
bridge = optional(string, "vmbr0")
tag = optional(number, -1)
tags = optional(list(string), ["terraform-managed-worker"])
scsihw = optional(string, "virtio-scsi-pci")
disks = optional(list(object({
id = optional(number, 0)
size = optional(string, "10G")
storage = optional(string, "local-lvm")
type = optional(string, "virtio")
discard = optional(string, null)
ssd = optional(number, 0) })),
[{
id = 0
size = "10G"
}])
image = string
ssh_user = string
user_password = string
ssh_keys = string
subnet = string
gw = string
worker_start_index = optional(string, "")
}))
}
variable "cloudinit_search_domain" {
description = "VM's DNS domain search"
type = string
default = null
}
variable "cloudinit_nameserver" {
description = "VM's DNS server"
type = string
default = null
}
variable "vm_cpu_type" {
description = "VM's CPU type"
type = string
default = "host"
}
variable "vm_sockets" {
description = "VM's CPU sockets"
type = number
default = 1
}
variable "vm_boot" {
description = "VM's boot device configuration"
type = string
default = "order=virtio0"
}
variable "k3s_master_kubelet_args" {
description = "k3s masters kubelet arguments"
type = list(string)
default = []
}
variable "k3s_worker_kubelet_args" {
description = "k3s workers kubelet arguments"
type = list(string)
default = []
}
variable "k3s_kube_control_manag_args" {
description = "k3s controller-manager extra configuration"
type = list(string)
default = ["bind-address=0.0.0.0"]
}
variable "k3s_kube_proxy_args" {
description = "k3s kube-proxy extra configuration"
type = list(string)
default = ["bind-address=0.0.0.0"]
}
variable "k3s_kube_sched_args" {
description = "k3s scheduler extra configuration"
type = list(string)
default = ["bind-address=0.0.0.0"]
}
variable "k3s_kube_apiserver_args" {
description = "k3s api server extra configuration"
type = list(string)
default = []
}
variable "k3s_master_node_taints" {
description = "k3s master taints"
type = list(string)
default = [] #["k3s-controlplane=true:NoExecute", "CriticalAddonsOnly=true:NoExecute"]
}
variable "k3s_worker_node_taints" {
description = "k3s worker taints"
type = list(string)
default = []
}
variable "k3s_master_node_labels" {
description = "K3s master labels"
type = list(string)
default = []
}
variable "k3s_worker_node_labels" {
description = "k3s worker labels"
type = list(string)
default = []
}
variable "k3s_network_policy_disable" {
description = "k3s default network policy controller configuration"
type = bool
default = false
}
variable "k3s_cloud_controller_disable" {
description = "k3s default network cloud controller configuration"
type = bool
default = true
}
variable "k3s_kube_proxy_disable" {
description = "k3s default kube-proxy configuration"
type = bool
default = false
}
variable "k3s_secrets_encryption_enable" {
description = "K3s default secrets encryption configuration"
type = bool
default = true
}
variable "k3s_write_kubeconfig_mode" {
description = "K3s default kube-config configuration"
type = string
default = "640"
}
variable "k3s_cluster_cidr" {
description = "k3s cluster pod cidr configuration"
type = string
default = "10.86.0.0/16"
}
variable "k3s_service_cidr" {
description = "K3s cluster service cidr configuration"
type = string
default = "10.88.0.0/16"
}
variable "k3s_sans" {
description = "K3s default certificate included entries configuration"
type = list(string)
default = null
}
variable "k3s_flannel_backend" {
description = "k3s default network backend configuration"
type = string
default = "vxlan"
}
variable "k3s_disable" {
description = "k3s addons disable configuration"
type = list(string)
default = []
}
variable "k3s_worker_protect_kernel_defaults" {
description = "k3s protect kernel defaults configuration"
type = bool
default = false
}
variable "k3s_snapshotter" {
description = "k3s default snapshotter configuration"
type = string
default = "native"
}
variable "private_ssh_key" {
type = string
description = "SSH private key to be used during provisioning.[The public one should exist in the nodes during provisioning]"
}
variable "k3s_version" {
type = string
description = "The k3s version to be installed.Eg. vX.Y.Z-rc1"
default = ""
}
variable "cilium" {
type = bool
description = "Install Cillium cni"
default = false
}
variable "cilium_version" {
type = string
description = "Cillium version to install.Example 1.13.2"
default = ""
}
variable "cilium_helm_flags" {
type = string
description = "Cillium helm arguments delimited with ','.Example key1=value,key2=value"
default = "k8sServicePort=6443,ipam.mode=kubernetes,operator.replicas=1"
}
variable "api_vip" {
type = string
description = "VIP ip address for k8s api.Can be an existing infrastructure loadbalancer."
default = ""
}
variable "kube_vip_enable" {
type = bool
default = false
}
variable "kube_vip_dev" {
type = string
default = "eth0"
}