-
Notifications
You must be signed in to change notification settings - Fork 84
/
variables.tf
207 lines (199 loc) · 7.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
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
# Proxmox
variable "proxmox_hostname" {
# The Talos image is distributed as an XZ archive and the Proxmox API does not allow you to
# upload an image with that file format. A remote-exec SSH provisoner is used to manage the
# image in talos_image.tf.
type = string
description = "IP address or hostname of the Proxmox server"
}
variable "proxmox_ssh_key_path" {
type = string
description = "Path to an SSH key used to connect to the Proxmox server"
}
variable "proxmox_resource_pool" {
type = string
default = "Kubernetes"
description = "Resource Pool to create on Proxmox for the cluster"
}
# Talos Image
variable "talos_image_datastore" {
type = string
default = "local"
description = "DataStore to use on Proxmox for the Talos image"
}
variable "talos_image_node_name" {
type = string
description = "Proxmox node used for storing the Talos image"
}
# Kubernetes Cluster
variable "talos_version" {
type = string
default = "v1.5.3"
description = "Identify here: https://github.com/siderolabs/talos/releases"
}
variable "kubernetes_version" {
type = string
default = "v1.28.2"
description = "Identify here: https://github.com/siderolabs/kubelet/pkgs/container/kubelet"
}
variable "qemu_guest_agent_version" {
type = string
default = "8.1.0"
description = "Identify here: https://github.com/siderolabs/extensions/pkgs/container/qemu-guest-agent"
}
variable "kubernetes_cluster_name" {
type = string
default = "kubernetes"
description = "Kubernetes cluster name you wish for Talos to use"
}
variable "talos_virtual_ip" {
type = string
description = "Virtual IP address you wish for Talos to use"
}
variable "talos_disable_flannel" {
type = bool
default = false
description = "Whether or not the Flannel CNI & Kube Proxy should be disabled for Cilium"
}
variable "controlplane_ip_prefix" {
# While I use DHCP reservation to assign IP Addresses to each virtual machine, talos must know
# the IP Address of a node in order to apply configuration and bootstrap it. This prefix is used
# in combination with the VM count integer to form the dynamic IP Address of each node. As a
# consequence, only 9 of each ControlPlane and workernode are supported: 101-109
type = string
description = "IP address prefix (less the last digit) of the controlplane nodes"
}
variable "workernode_ip_prefix" {
# While I use DHCP reservation to assign IP Addresses to each virtual machine, talos must know
# the IP Address of a node in order to apply configuration and bootstrap it. This prefix is used
# in combination with the VM count integer to form the dynamic IP Address of each node. As a
# consequence, only 9 of each ControlPlane and workernode are supported: 151-159
type = string
description = "IP address prefix (less the last digit) of the Worker Nodes"
}
# controlplanes
variable "controlplane_vmid_prefix" {
# I set my VMIDs according to my IP Addressing.
# This prefix has the last digit set to the Terraform Count.
type = number
description = "VMID prefix (less the last digit) of the controlplane nodes"
}
variable "controlplane_num" {
type = number
default = 3
description = "Quantity of controlplane nodes to provision"
}
variable "controlplane_hostname_prefix" {
type = string
default = "k8s-cp"
description = "Hostname prefix (less the last digit) of the controlplane nodes"
}
variable "controlplane_node_name" {
type = string
description = "Proxmox node used for provisioning the workernodes"
}
variable "controlplane_tags" {
type = list
default = ["app-kubernetes","type-controlplane"]
description = "Tags to apply to the controlplane virtual machines"
}
variable "controlplane_cpu_cores" {
type = number
default = 4
description = "Quantity of CPU cores to apply to the controlplane virtual machines"
}
variable "controlplane_memory" {
type = number
default = 10240
description = "Quantity of memory (megabytes) to apply to the controlplane virtual machines"
}
variable "controlplane_datastore" {
type = string
default = "FlashPool"
description = "Datastore used for the controlplane virtual machines"
}
variable "controlplane_disk_size" {
# Talos recommends 100Gb
type = string
default = "50"
description = "Quantity of disk space (gigabytes) to apply to the controlplane virtual machines"
}
variable "controlplane_network_device" {
type = string
default = "vmbr0"
description = "Network device used for the controlplane virtual machines"
}
variable "controlplane_mac_address_prefix" {
# I use DHCP reservation for assigning static IPs.
# This prefix has the last digit set to the Terraform Count.
type = string
description = "MAC address (less the last digit) of the controlplane nodes"
}
variable "controlplane_vlan_id" {
type = number
default = null
description = "VLAN ID used for the controlplane nodes"
}
# Worker Nodes
variable "workernode_vmid_prefix" {
# I set my VMIDs according to my IP Addressing.
# This prefix has the last digit set to the Terraform Count.
type = number
description = "The VMID Prefix (less the last digit) of the workernode nodes"
}
variable "workernode_num" {
type = number
default = 3
description = "Quantity of workernode nodes to provision"
}
variable "workernode_hostname_prefix" {
type = string
default = "k8s-node"
description = "Hostname prefix (less the last digit) of the workernode nodes"
}
variable "workernode_node_name" {
type = string
description = "Proxmox node used for provisioning the workernodes"
}
variable "workernode_tags" {
type = list
default = ["app-kubernetes","type-workernode"]
description = "Tags to apply to the workernode virtual machines"
}
variable "workernode_cpu_cores" {
type = number
default = 10
description = "Quantity of CPU cores to apply to the workernode virtual machines"
}
variable "workernode_memory" {
type = number
default = 51200
description = "Quantity of memory (megabytes) to apply to the workernode virtual machines"
}
variable "workernode_datastore" {
type = string
default = "FlashPool"
description = "Datastore used for the workernode virtual machines"
}
variable "workernode_disk_size" {
# Talos recommends 100Gb
type = string
default = "50"
description = "Quantity of disk space (gigabytes) to apply to the workernode virtual machines"
}
variable "workernode_network_device" {
type = string
default = "vmbr0"
description = "Network device used for the workernode virtual machines"
}
variable "workernode_mac_address_prefix" {
# I use DHCP reservation for assigning static IPs.
# This prefix has the last digit set to the Terraform Count.
type = string
description = "MAC address (less the last digit) of the workernode nodes"
}
variable "workernode_vlan_id" {
type = number
default = null
description = "VLAN ID used for the workernode nodes"
}