-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
226 lines (190 loc) · 5.72 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
# Node Settings
variable "node_count" {
description = "Number of worker nodes to deploy"
type = number
default = 0
}
variable "node_prefix" {
description = "Prefix for worker node names"
type = string
default = "us20-k8s"
}
variable "node_cpu_count" {
description = "Number of CPUs for each worker node"
type = number
default = 4
}
variable "node_memory_gb" {
description = "Memory in GB for each worker node"
type = number
default = 8
}
variable "node_os_disk_size" {
description = "OS disk size in GB for each worker node"
type = number
default = 32
}
variable "node_os_disk_xoa_sr_uuid" {
description = "Storage repository UUID for worker node OS disks"
type = list(string)
}
variable "node_xoa_template_uuid" {
description = "Template UUID for worker nodes in Xen Orchestra"
type = string
}
variable "node_xoa_network_name" {
description = "Network name for worker nodes in Xen Orchestra (overrides `xoa_network_name`)"
type = string
default = null
}
variable "node_expected_cidr" {
description = "Expected CIDR for nodes, used for checking if the virtual machine is now ready. Replaces the old `wait_for_ip`"
type = string
default = "10.0.0.0/16"
}
variable "node_tags" {
description = "Tags to apply to worker nodes"
type = list(string)
default = [
"xcp-ng.org/arch:amd64",
"xcp-ng.org/os:ubuntu"
]
}
# Master Settings
variable "master_count" {
description = "Number of master nodes to deploy"
type = number
default = 3
}
variable "master_prefix" {
description = "Prefix for master node names"
type = string
default = "us20-k8s"
}
variable "master_cpu_count" {
description = "Number of CPUs for each master node"
type = number
default = 2
}
variable "master_memory_gb" {
description = "Memory in GB for each master node"
type = number
default = 4
}
variable "master_os_disk_size" {
description = "OS disk size in GB for each master node"
type = number
default = 32
}
variable "master_os_disk_xoa_sr_uuid" {
description = "Storage repository UUID for master node OS disks"
type = list(string)
}
variable "master_xoa_template_uuid" {
description = "Template UUID for master nodes in Xen Orchestra"
type = string
}
variable "master_xoa_network_name" {
description = "Network name for master nodes in Xen Orchestra (overrides `xoa_network_name`)"
type = string
default = null
}
variable "master_expected_cidr" {
description = "Expected CIDR for master nodes, used for checking if the virtual machine is now ready. Replaces the old `wait_for_ip`"
type = string
default = "10.0.0.0/16"
}
variable "master_tags" {
description = "Tags to apply to master nodes"
type = list(string)
default = [
"xcp-ng.org/arch:amd64",
"xcp-ng.org/os:ubuntu"
]
}
# Xen Orchestra Settings
variable "xoa_pool_name" {
description = "Default name of the XCP-ng pool as seen in Xen Orchestra"
type = string
default = null
}
variable "xoa_network_name" {
description = "Default network for virtual machines as seen in Xen Orchestra"
type = string
default = null
}
variable "master_xoa_pool_name" {
description = "Name of the Xen Orchestra pool for master nodes (overrides `xoa_pool_name` for masters)"
type = string
default = null
}
variable "node_xoa_pool_name" {
description = "Name of the Xen Orchestra pool for worker nodes (overrides `xoa_pool_name` for nodes)"
type = string
default = null
}
variable "start_delay" {
description = "The amount of time the cluster virtual machines will wait on XCP-NG host startup"
type = number
default = 0
}
# Other Settings
variable "cluster_dns_zone" {
description = "DNS zone for the cluster"
type = string
}
variable "public_ssh_key" {
description = "Public SSH key for accessing the nodes"
type = string
}
variable "private_ssh_key_path" {
description = "Private SSH key path for accessing the nodes"
type = string
default = "/root/.ssh/id_rsa"
}
variable "dns_zone" {
description = "DNS zone"
type = string
}
variable "dns_sub_zone" {
description = "DNS sub-zone"
type = string
}
variable "cluster_name" {
description = "Name used in the virtual machine names, not an actual Kubernetes settings"
type = string
default = "my-cluster"
}
variable "microk8s_version" {
description = "The snap channel version to install, for example `1.29/stable`. Defaults to latest if not specified"
type = string
default = null
}
variable "install_k8s_image_swapper" {
description = "This will add the chart by default to use the k8s-image-swapper and save on imagePulls to Dockerhub, which are rate-limited"
type = bool
default = false
}
variable "k8s_image_swapper_private_registy" {
description = "Point this to the FQDN of a private registry so the k8s-image-swapper can pull from there. Has no effect if `install_k8s_image_swapper` is unused"
type = string
default = ""
}
variable "cloud_network_config_template" {
description = "Template for cloud network config"
type = string
default = <<EOF
network:
version: 1
config:
- type: physical
name: eth0
subnets:
- type: dhcp
EOF
}
variable "tags" {
description = "A list of key+value pairs to apply to the deployment"
type = list(string)
default = []
}