-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
143 lines (138 loc) · 3.95 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
############################
## Deployment Information ##
############################
variable "namespace" {
type = string
description = ""
}
variable "name" {
type = string
description = ""
}
variable "component" {
type = string
description = ""
}
variable "part_of" {
type = string
description = ""
}
variable "labels" {
type = map(string)
description = ""
}
##################
## Pod Security ##
##################
variable "service_account_name" {
type = string
description = ""
default = null
}
variable "automount_service_account_token" {
type = bool
description = ""
default = false
}
#####################
## Pod Replication ##
#####################
variable "replicas" {
type = number
description = ""
default = 1
}
################################
## Pod Affinity and Placement ##
################################
variable "pod_affinity_topology_key" {
type = string
description = ""
default = "failure-domain.beta.kubernetes.io/zone"
}
variable "preferred_node_selector" {
type = list(object({
weight = number,
key = string,
operator = string,
values = list(string)
}))
description = "A list of objects that define `preferredDuringSchedulingIgnoredDuringExecution` for this deployment"
default = []
}
#########################
## Pod Mounted Volumes ##
#########################
variable "empty_dir_volumes" {
type = map(object({
mount_path = string,
sub_path = optional(string),
mount_propagation = optional(string),
read_only = optional(bool)
}))
description = ""
default = {}
}
variable "secret_volumes" {
type = map(object({
mount_path = string,
sub_path = optional(string),
mount_propagation = optional(string),
read_only = optional(bool)
}))
description = ""
default = {}
}
variable "config_map_volumes" {
type = map(object({
mount_path = string,
sub_path = optional(string),
mount_propagation = optional(string),
read_only = optional(bool)
}))
description = ""
default = {}
}
####################
## Pod Containers ##
####################
variable "containers" {
type = list(object({
name = optional(string),
image_repository = string,
image_name = string,
image_tag = optional(string),
image_pull_policy = optional(string),
is_init = optional(bool),
cpu_request = optional(string),
memory_request = optional(string),
cpu_limit = optional(string),
memory_limit = optional(string),
command = optional(list(string)),
simple_environment_variables = optional(map(string)),
secret_environment_variables = optional(map(object({ name = string, key = string }))),
configmap_environment_variables = optional(map(object({ name = string, key = string }))),
# TODO: Add mapped_environment_variables for variable mapping support
ports = optional(list(object({
name = optional(string), # optional
protocol = optional(string), # optional
host_ip = optional(string), # optional
host_port = optional(number), # optional
container_port = number
}))),
http_get_liveness_probe = optional(list(object({
path = string,
port = number,
initial_delay_seconds = number, # optional
period_seconds = number # optional
}))),
http_get_readiness_probe = optional(list(object({
path = string,
port = number,
initial_delay_seconds = number, # optional
period_seconds = number # optional
})))
}))
description = ""
default = []
}