-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
variables.tf
221 lines (183 loc) · 9.42 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
variable "cloud_credential_name" {
type = string
description = "Name of vSphere cloud credential"
}
variable "node_vsphere_template" {
type = string
description = "Global setting for vSphere template from which to create all cluster nodes; either this or `vsphere_template` parameter inside `node_spec` (which overrides it) need to be set"
default = null
}
variable "node_datacenter" {
type = string
description = "Global setting for vSphere datacenter in which to create all cluster nodes; either this or `datacenter` parameter inside `node_spec` (which overrides it) need to be set"
default = null
}
variable "node_cluster" {
type = string
description = "Global setting for vSphere cluster in which to create all cluster nodes; either this or `cluster` parameter inside `node_spec` (which overrides it) need to be set"
default = null
}
variable "node_datastore" {
type = string
description = "Global setting for vSphere datastore in which to create all cluster nodes; either this or `datastore` parameter inside `node_spec` (which overrides it) need to be set"
default = null
}
variable "node_resource_pool" {
type = string
description = "Global setting for vSphere resource pool in which to create all cluster nodes; `resource_pool` parameter inside `node_spec` overrides this global setting; if neither are set, nodes will be created in cluster root"
default = null
}
variable "node_folder" {
type = string
description = "Global setting for vSphere VM and template folder in which to create all cluster nodes; `folder` parameter inside `node_spec` overrides this global setting; if neither are set, nodes will be created in datacenter root"
default = null
}
variable "node_portgroup" {
type = string
description = "Global setting for vSphere portgroup to which to connect all cluster nodes; either this or `portgroup` parameter inside `node_spec` (which overrides it) need to be set"
default = null
}
variable "node_template_ssh_user" {
type = string
description = "Global setting for the SSH user for Rancher to connect to all cluster nodes after deployment from template; either this or `template_ssh_user` parameter inside `node_spec` (which overrides it) need to be set"
default = null
}
variable "node_template_ssh_password" {
type = string
description = "Global setting for the SSH password for Rancher to connect to all cluster nodes after deployment from template; either this or `template_ssh_password` parameter inside `node_spec` (which overrides it) need to be set"
default = null
}
variable "node_template_ssh_user_group" {
type = string
description = "Global setting for the user group to which Rancher will chown the uploaded keys on all cluster nodes; either this or `template_ssh_user_group` parameter inside `node_spec` (which overrides it) need to be set"
default = null
}
variable "node_cloud_config" {
type = string
description = "Global setting for the contents of cloud-config YAML file which will be applied on all cluster nodes; these contents should be defined in the root module either inline using the `heredoc` synthax, or loaded from a file using Terraform's `file()` function. `cloud_config` parameter inside `node_spec` overrides this global setting on a per node role basis; if neither are set, cloud-config file for the node will have content of `#cloud-config` (which effectively makes it empty)"
default = null
}
variable "node_network_protocol_profile_addressing" {
type = bool
description = "(Requires minimum Rancher v2.3.6) Whether to use node portgroup's network protocol profile to transfer network properties such as IP address, subnet mask, default gateway, DNS servers, DNS search path and DNS domain to the node through its vApp properties. In order for the transferred properties to be actually configured in the OS, `cloud_config` can be used to read the vApp properties through VMware Tools and configure the OS network stack. The following vApp properties are read from the network protocol profile and transferred to node VMs: `guestinfo.dns.servers` (DNS servers specified in the network protocol profile), `guestinfo.dns.domain` (domain name), `guestinfo.dns.searchpath` (DNS search path), `guestinfo.interface.0.ip.0.address` (assigned IP address from the IP pool), `guestinfo.interface.0.ip.0.netmask` (subnet mask of the assigned IP address) and `guestinfo.interface.0.route.0.gateway`(default gateway). If set to `false` (default) no vApp properties are configured and cluster nodes will use DHCP assigned addresses"
default = false
}
variable "node_spec" {
description = "Specification of node templates for each of the node roles. Available roles are `control_plane`, `etcd`, `master` (consolidated `control_plane` and `etcd`), `worker` and `all_in_one` (`control_plane`, `etcd` and `worker` consolidate on one node, used for creating single node clusters). `node_spec` allows for specifying parameters such as vSphere template, datacenter, cluster etc. on a node role basis. If these parameters are set both through `node_spec` and globally through `node_*`, `node_spec` values will have precedence. As a minimum, each node role needs to have the following inputs set in `node_spec`: `num_vcpu` (VM number of vCPUs), `memory_gb` (VM memory in GB) and `disk_gb` (VM disk size in GB) - all other values can be inherited from global variables. Take a look at the `examples` directory for detailed synthax"
}
variable "cluster_name" {
type = string
description = "Cluster name"
}
variable "cluster_description" {
type = string
description = "Cluster description"
}
variable "enable_monitoring" {
type = bool
description = "Whether to enable cluster monitoring"
default = true
}
variable "enable_alerting" {
type = bool
description = "Whether to enable cluster alerting"
default = false
}
variable "enable_istio" {
type = bool
description = "Whether to enable Istio for the cluster"
default = false
}
variable "kubernetes_version" {
type = string
description = "Kubernetes version to deploy"
default = null
}
variable "kubernetes_network_plugin" {
type = string
description = "Kubernetes network plugin to use, one of `canal` (default), `flannel`, `calico`, `weave`"
default = "canal"
}
variable "private_registries_spec" {
description = "Specification of private registries for Docker images. Multiple registries can be specified, take a look at the `examples` directory for synthax. Only the `url` parameter is mandatory. If you set password access to registry, for future Terraform runs have in mind that Rancher API doesn't return registry password, so every Terraform operation will offer to change the cluster resource by adding the registry password field even if you haven't done any changes in your spec"
default = {}
}
variable "cloud_provider_spec" {
description = "Specification of vSphere cloud provider, which is necessary to allow dynamic provisioning of volumes. Take a look at the `examples` directory for synthax and Rancher vSphere Cloud Provider documentation for explanation of parameters"
default = {}
}
variable "master_node_pool_name" {
type = string
description = "Name of the master (consolidated control plane and etcd) node pool"
default = "master"
}
variable "master_node_prefix" {
type = string
description = "Prefix for nodes created in master (consolidated control plane and etcd) node pool"
default = "master-"
}
variable "master_node_quantity" {
type = number
description = "Number of nodes in master (consolidated control plane and etcd) node pool"
default = null
}
variable "etcd_node_pool_name" {
type = string
description = "Name of the etcd node pool"
default = "etcd"
}
variable "etcd_node_prefix" {
type = string
description = "Prefix for nodes created in etcd node pool"
default = "etcd-"
}
variable "etcd_node_quantity" {
type = number
description = "Number of nodes in etcd node pool"
default = null
}
variable "control_plane_node_pool_name" {
type = string
description = "Name of the control plane node pool"
default = "control-plane"
}
variable "control_plane_node_prefix" {
type = string
description = "Prefix for nodes created in control plane node pool"
default = "control-plane-"
}
variable "control_plane_node_quantity" {
type = number
description = "Number of nodes in control plane node pool"
default = null
}
variable "worker_node_pool_name" {
type = string
description = "Name of the worker node pool"
default = "worker"
}
variable "worker_node_prefix" {
type = string
description = "Prefix for nodes created in worker node pool"
default = "worker-"
}
variable "worker_node_quantity" {
type = number
description = "Number of nodes in worker node pool"
default = null
}
variable "single_node_cluster" {
type = bool
description = "Whether to create a single node cluster with all roles consolidated on one node"
default = false
}
variable "all_in_one_node_pool_name" {
type = string
description = "Name of the all-in-one node pool"
default = "all-in-one"
}
variable "all_in_one_node_prefix" {
type = string
description = "Prefix for node created in the all-in-one node pool"
default = "all-in-one-"
}