-
Notifications
You must be signed in to change notification settings - Fork 96
/
Copy pathvariables.tf
382 lines (325 loc) · 11.7 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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
// ----------------------------------------------------------------------------
// Required Variables
// ----------------------------------------------------------------------------
variable "gcp_project" {
description = "The name of the GCP project to use"
type = string
}
// ----------------------------------------------------------------------------
// Optional Variables
// ----------------------------------------------------------------------------
variable "cluster_name" {
description = "Name of the Kubernetes cluster to create"
type = string
default = ""
}
variable "zone" {
description = "Zone in which to create the cluster (deprecated, use cluster_location instead)"
type = string
default = ""
}
variable "cluster_location" {
description = "The location (region or zone) in which the cluster master will be created. If you specify a zone (such as us-central1-a), the cluster will be a zonal cluster with a single cluster master. If you specify a region (such as us-west1), the cluster will be a regional cluster with multiple masters spread across zones in the region"
type = string
default = "us-central1-a"
}
variable "cluster_network" {
description = "The name of the network (VPC) to which the cluster is connected"
type = string
default = "default"
}
variable "cluster_subnetwork" {
description = "The name of the subnetwork to which the cluster is connected. Leave blank when using the 'default' vpc to generate a subnet for your cluster"
type = string
default = ""
}
variable "bucket_location" {
description = "Bucket location for storage"
type = string
default = "US"
}
variable "jenkins_x_namespace" {
description = "Kubernetes namespace to install Jenkins X in"
type = string
default = "jx"
}
variable "force_destroy" {
description = "Flag to determine whether storage buckets get forcefully destroyed"
type = bool
default = false
}
variable "parent_domain" {
description = "**Deprecated** Please use apex_domain variable instead.r"
type = string
default = ""
}
variable "apex_domain" {
description = "The parent / apex domain to be used for the cluster"
type = string
default = ""
}
variable "parent_domain_gcp_project" {
description = "**Deprecated** Please use apex_domain_gcp_project variable instead."
type = string
default = ""
}
variable "apex_domain_gcp_project" {
description = "The GCP project the apex domain is managed by, used to write recordsets for a subdomain if set. Defaults to current project."
type = string
default = ""
}
variable "subdomain" {
description = "Optional sub domain for the installation"
type = string
default = ""
}
variable "apex_domain_integration_enabled" {
description = "Flag that when set attempts to create delegation records in apex domain to point to domain created by this module"
type = bool
default = true
}
variable "tls_email" {
description = "Email used by Let's Encrypt. Required for TLS when apex_domain is specified"
type = string
default = ""
}
variable "create_ui_sa" {
description = "Whether the service accounts for the UI should be created"
type = bool
default = true
}
// ----------------------------------------------------------------------------
// Vault
// ----------------------------------------------------------------------------
variable "vault_url" {
description = "URL to an external Vault instance in case Jenkins X shall not create its own system Vault"
type = string
default = ""
}
// ----------------------------------------------------------------------------
// Velero/backup
// ----------------------------------------------------------------------------
variable "enable_backup" {
description = "Whether or not Velero backups should be enabled"
type = bool
default = false
}
variable "velero_namespace" {
description = "Kubernetes namespace for Velero"
type = string
default = "velero"
}
variable "velero_schedule" {
description = "The Velero backup schedule in cron notation to be set in the Velero Schedule CRD (see [default-backup.yaml](https://github.com/jenkins-x/jenkins-x-boot-config/blob/master/systems/velero-backups/templates/default-backup.yaml))"
type = string
default = "0 * * * *"
}
variable "velero_ttl" {
description = "The the lifetime of a velero backup to be set in the Velero Schedule CRD (see [default-backup.yaml](https://github.com/jenkins-x/jenkins-x-boot-config/blob/master/systems/velero-backups/templates/default-backup))"
type = string
default = "720h0m0s"
}
// ----------------------------------------------------------------------------
// cluster configuration
// ----------------------------------------------------------------------------
variable "enable_private_endpoint" {
type = bool
description = "(Beta) Whether the master's internal IP address is used as the cluster endpoint. Requires VPC-native"
default = false
}
variable "enable_private_nodes" {
type = bool
description = "(Beta) Whether nodes have internal IP addresses only. Requires VPC-native"
default = false
}
variable "master_ipv4_cidr_block" {
type = string
description = "The IP range in CIDR notation to use for the hosted master network. This range must not overlap with any other ranges in use within the cluster's network, and it must be a /28 subnet"
default = "10.0.0.0/28"
}
variable "master_authorized_networks" {
type = list(object({ cidr_block = string, display_name = string }))
description = "List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically allowlists)."
default = []
}
variable "ip_range_pods" {
type = string
description = "The IP range in CIDR notation to use for pods. Set to /netmask (e.g. /18) to have a range chosen with a specific netmask. Enables VPC-native"
default = ""
}
# Max Pods per Node --- CIDR Range per Node
# 8 /28
# 9–16 /27
# 17–32 /26
# 33–64 /25
# 65–110 /24
variable "max_pods_per_node" {
type = number
description = "Max gke nodes = 2^($CIDR_RANGE_PER_NODE-$POD_NETWORK_CIDR) (see [gke docs](https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr))"
default = 64 # 2^(25-21) = 16 max nodes
}
variable "ip_range_services" {
type = string
description = "The IP range in CIDR notation use for services. Set to /netmask (e.g. /21) to have a range chosen with a specific netmask. Enables VPC-native"
default = ""
}
variable "node_machine_type" {
description = "Node type for the Kubernetes cluster"
type = string
default = "n1-standard-2"
}
variable "node_preemptible" {
description = "Use preemptible nodes"
type = bool
default = false
}
variable "node_spot" {
description = "Use spot nodes"
type = bool
default = false
}
// Recommended to initially create this pool because the auth scops with elevated permissions are neccessary for creating the initial buckets and other resources, then you can delete it.
variable "enable_primary_node_pool" {
description = "create a node pool for primary nodes if disabled you must create your own pool"
type = bool
default = true
}
variable "initial_cluster_node_count" {
description = "Initial number of cluster nodes"
type = number
default = 3
}
variable "initial_primary_node_pool_node_count" {
description = "Initial primary node pool nodes"
type = number
default = 3
}
variable "autoscaler_min_node_count" {
description = "primary node pool min nodes"
type = number
default = 3
}
variable "autoscaler_max_node_count" {
description = "primary node pool max nodes"
type = number
default = 5
}
variable "autoscaler_location_policy" {
description = "location policy for primary node pool"
type = string
default = "ANY"
}
variable "node_disk_size" {
description = "Node disk size in GB"
type = string
default = "100"
}
variable "node_disk_type" {
description = "Node disk type, either pd-standard or pd-ssd"
type = string
default = "pd-standard"
}
variable "release_channel" {
description = "The GKE release channel to subscribe to. See https://cloud.google.com/kubernetes-engine/docs/concepts/release-channels"
type = string
default = "REGULAR"
}
variable "resource_labels" {
description = "Set of labels to be applied to the cluster"
type = map(any)
default = {}
}
// ----------------------------------------------------------------------------
// jx-requirements.yml specific variables only used for template rendering
// ----------------------------------------------------------------------------
variable "git_owner_requirement_repos" {
description = "The git id of the owner for the requirement repositories"
type = string
default = ""
}
variable "dev_env_approvers" {
description = "List of git users allowed to approve pull request for dev enviornment repository"
type = list(string)
default = []
}
variable "lets_encrypt_production" {
description = "Flag to determine wether or not to use the Let's Encrypt production server."
type = bool
default = true
}
variable "webhook" {
description = "Jenkins X webhook handler for git provider"
type = string
default = "lighthouse"
}
variable "version_stream_url" {
description = "The URL for the version stream to use when booting Jenkins X. See https://jenkins-x.io/docs/concepts/version-stream/"
type = string
default = "https://github.com/jenkins-x/jenkins-x-versions.git"
}
variable "version_stream_ref" {
description = "The git ref for version stream to use when booting Jenkins X. See https://jenkins-x.io/docs/concepts/version-stream/"
type = string
default = "master"
}
variable "jx2" {
description = "Is a Jenkins X 2 install"
type = bool
default = true
}
variable "gsm" {
description = "Enables Google Secrets Manager, not available with JX2"
type = bool
default = false
}
variable "jx_git_url" {
description = "URL for the Jenins X cluster git repository"
type = string
default = ""
}
variable "jx_bot_username" {
description = "Bot username used to interact with the Jenkins X cluster git repository"
type = string
default = ""
}
variable "jx_bot_token" {
description = "Bot token used to interact with the Jenkins X cluster git repository"
type = string
default = ""
}
variable "jx_git_operator_version" {
description = "The jx-git-operator helm chart version"
type = string
default = "0.0.192"
}
variable "kuberhealthy" {
description = "Enables Kuberhealthy helm installation"
type = bool
default = true
}
variable "delete_protect" {
description = "Flag used to set the `deletion_protection` attribute to prevent cluster deletion"
type = bool
default = true
}
// GCP Artifact
variable "artifact_location" {
description = "artifact registry repository Location"
type = string
default = "us-central1"
}
variable "artifact_repository_id" {
description = "artifact registry repository Name"
type = string
default = "oci"
}
variable "artifact_description" {
description = "artifact registry repository Description"
type = string
default = "jenkins-x Docker Repository"
}
variable "artifact_enable" {
description = "Create artifact registry repository"
type = bool
default = true
}