forked from ballj/terraform-kubernetes-deployment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
528 lines (441 loc) · 11.6 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
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
variable "object_prefix" {
type = string
description = "Unique name to prefix all objects with"
}
variable "namespace" {
type = string
description = "Kubernetes namespace for deployment"
}
variable "image_name" {
type = string
description = "Docker image to use"
}
variable "image_tag" {
type = string
description = "Docker image tag to use"
}
variable "timeout_create" {
type = string
description = "Timeout for creating the deployment"
default = "3m"
}
variable "timeout_update" {
type = string
description = "Timeout for creating the deployment"
default = "2m"
}
variable "timeout_delete" {
type = string
description = "Timeout for creating the deployment"
default = "10m"
}
variable "labels" {
type = map(string)
description = "Labels to add"
default = {}
}
variable "ports" {
type = any
description = "Ports to expose from container"
default = []
}
variable "replicas" {
type = number
description = "Amount of pods to create"
default = 1
}
variable "pull_policy" {
type = string
description = "Pull policy for the image"
default = "IfNotPresent"
}
variable "annotations" {
type = map(string)
description = "Annotations to add to the deployment"
default = {}
}
variable "template_annotations" {
type = map(string)
description = "Annotations to add to the template"
default = {}
}
variable "min_ready_seconds" {
type = number
description = "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing"
default = 1
}
variable "max_ready_seconds" {
type = number
description = "The maximum time in seconds for a deployment to make progress before it is considered to be failed"
default = 600
}
variable "revision_history" {
type = number
description = "The number of old ReplicaSets to retain"
default = 4
}
variable "update_strategy" {
type = string
description = "The number of old ReplicaSets to retain"
default = "RollingUpdate"
}
variable "update_max_surge" {
type = string
description = "Maximum number of pods that can be scheduled above desired"
default = "25%"
}
variable "update_max_unavailable" {
type = string
description = "Maximum number of pods that can be unavailable during the update"
default = "25%"
}
variable "command" {
type = list(string)
description = "Entrypoint array. Not executed within a shell"
default = []
}
variable "arguments" {
type = list(string)
description = "Arguments to the entrypoint"
default = []
}
variable "volumes" {
type = any
description = "Volume configuration"
default = []
}
variable "security_context_enabled" {
type = bool
description = "Enable the security context"
default = true
}
variable "security_context_uid" {
type = number
description = "Group to run container as"
default = 1000
}
variable "security_context_gid" {
type = number
description = "User to run container as"
default = 1000
}
variable "custom_certificate_authority" {
type = list(string)
description = "Certificate authorities to add to image"
default = []
}
variable "env" {
type = map(string)
description = "Environment variables"
default = {}
}
variable "env_secret" {
type = list(object({
name = string
secret = string
key = string
}))
description = "Environment variables to pull from secrets"
default = []
}
variable "post_start_type" {
type = string
description = "Post_start is called immediately after a container is created"
default = ""
}
variable "post_start_command" {
type = list(string)
description = "Post_start command to execute"
default = []
}
variable "post_start_host" {
type = string
description = "Host that the http_get will test"
default = ""
}
variable "post_start_port" {
type = number
description = "Port that the post_start will test"
default = 0
}
variable "post_start_scheme" {
type = string
description = "Scheme of the http_get request"
default = "HTTP"
}
variable "post_start_path" {
type = string
description = "Path for the http_get request"
default = "/"
}
variable "post_start_http_header" {
type = list(string)
description = "HTTP headers for the http_get request"
default = []
}
variable "readiness_probe_enabled" {
type = bool
description = "Enable the readyness probe"
default = true
}
variable "readiness_probe_initial_delay" {
type = number
description = "Initial delay of the probe in seconds"
default = 30
}
variable "readiness_probe_period" {
type = number
description = "Period of the probe in seconds"
default = 10
}
variable "readiness_probe_timeout" {
type = number
description = "Timeout of the probe in seconds"
default = 1
}
variable "readiness_probe_success" {
type = number
description = "Minimum consecutive successes for the probe"
default = 1
}
variable "readiness_probe_failure" {
type = number
description = "Minimum consecutive failures for the probe"
default = 2
}
variable "readiness_probe_type" {
type = string
description = "Type of probe to deploy"
default = "tcp_socket"
}
variable "readiness_probe_command" {
type = list(string)
description = "Command for the probe to use"
default = []
}
variable "readiness_probe_host" {
type = string
description = "Host that the probe will test"
default = ""
}
variable "readiness_probe_port" {
type = number
description = "Port that the probe will test"
default = 0
}
variable "readiness_probe_scheme" {
type = string
description = "Scheme of the probe http_get probe"
default = "HTTP"
}
variable "readiness_probe_path" {
type = string
description = "Path for the http_get probe"
default = "/"
}
variable "readiness_probe_http_header" {
type = list(string)
description = "HTTP headers for the http_get probe"
default = []
}
variable "liveness_probe_enabled" {
description = "Enable the readyness probe"
default = true
}
variable "liveness_probe_initial_delay" {
type = number
description = "Initial delay of the probe in seconds"
default = 30
}
variable "liveness_probe_period" {
type = number
description = "Period of the probe in seconds"
default = 10
}
variable "liveness_probe_timeout" {
type = number
description = "Timeout of the probe in seconds"
default = 1
}
variable "liveness_probe_success" {
type = number
description = "Minimum consecutive successes for the probe"
default = 1
}
variable "liveness_probe_failure" {
type = number
description = "Minimum consecutive failures for the probe"
default = 3
}
variable "liveness_probe_type" {
type = string
description = "Type of probe to deploy"
default = "tcp_socket"
}
variable "liveness_probe_command" {
type = list(string)
description = "Command for the probe to use"
default = []
}
variable "liveness_probe_host" {
type = string
description = "Host that the probe will test"
default = ""
}
variable "liveness_probe_port" {
type = number
description = "Port that the probe will test"
default = 0
}
variable "liveness_probe_scheme" {
type = string
description = "Scheme of the probe http_get probe"
default = "HTTP"
}
variable "liveness_probe_path" {
type = string
description = "Path for the http_get probe"
default = "/"
}
variable "liveness_probe_http_header" {
type = list(string)
description = "HTTP headers for the http_get probe"
default = []
}
variable "startup_probe_enabled" {
description = "Enable the readyness probe"
default = true
}
variable "startup_probe_initial_delay" {
type = number
description = "Initial delay of the probe in seconds"
default = 10
}
variable "startup_probe_period" {
type = number
description = "Period of the probe in seconds"
default = 1
}
variable "startup_probe_timeout" {
type = number
description = "Timeout of the probe in seconds"
default = 1
}
variable "startup_probe_success" {
type = number
description = "Minimum consecutive successes for the probe"
default = 1
}
variable "startup_probe_failure" {
type = number
description = "Minimum consecutive failures for the probe"
default = 90
}
variable "startup_probe_type" {
type = string
description = "Type of probe to deploy"
default = "tcp_socket"
}
variable "startup_probe_command" {
type = list(string)
description = "Command for the probe to use"
default = []
}
variable "startup_probe_host" {
type = string
description = "Host that the probe will test"
default = ""
}
variable "startup_probe_port" {
type = number
description = "Port that the probe will test"
default = 0
}
variable "startup_probe_scheme" {
type = string
description = "Scheme of the probe http_get probe"
default = "HTTP"
}
variable "startup_probe_path" {
type = string
description = "Path for the http_get probe"
default = "/"
}
variable "startup_probe_http_header" {
type = list(string)
description = "HTTP headers for the http_get probe"
default = []
}
variable "service_session_affinity" {
type = string
description = "Used to maintain session affinity"
default = "None"
}
variable "service_type" {
type = string
description = "Service type"
default = "ClusterIP"
}
variable "service_loadbalancer_ip" {
type = string
description = "Default ip address for the loadbalancer"
default = ""
}
variable "service_annotations" {
type = map(string)
description = "Annotations to add to the service"
default = {}
}
variable "service_traffic_policy" {
type = string
description = "Service external traffic policy"
default = "Local"
}
variable "init_volume_permissions_enabled" {
description = "Container to set volume permissions on pod startup"
default = true
}
variable "init_volume_permissions_extraargs" {
type = list(string)
description = "Extra commands to run on the volume init container"
default = []
}
variable "init_volume_permissions_image_name" {
type = string
description = "Image to use for the init container"
default = "alpine"
}
variable "init_volume_permissions_image_tag" {
type = string
description = "Tag to use for the init container"
default = "3.12.3"
}
variable "init_volume_permissions_image_pull_policy" {
type = string
description = "Pull policy to use for the init container"
default = "IfNotPresent"
}
variable "init_customca_image_name" {
type = string
description = "Tag to use for the init container"
default = "alpine"
}
variable "init_customca_image_tag" {
type = string
description = "Tag to use for the init container"
default = "3.12.3"
}
variable "init_customca_image_pull_policy" {
type = string
description = "Pull policy to use for the init container"
default = "IfNotPresent"
}
variable "init_customca_env_secret" {
type = list(object({
name = string
secret = string
key = string
}))
description = "Env secrets to use for the init container"
default = []
}