-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvariables.tf
196 lines (196 loc) · 6.98 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
variable "name" {
type = string
description = "(Required) Deployment name"
}
variable "namespace" {
type = string
description = "(Required) K8S namespace where deploy app"
}
variable "deployment_annotations" {
description = "Annotations for deployment"
type = map(string)
default = null
}
variable "template_annotations" {
description = "Annotations for pod (template)"
type = map(string)
default = null
}
variable "image" {
type = string
description = "(Required) Docker image for app"
}
variable "volume_claim" {
type = list(object({ name = string, namespace = string, access_modes = list(string), requests_storage = string, storage_class_name = string, persistent_volume_name = string }))
description = "(Optional) Attach Persistant Volume Claim"
default = []
}
variable "toleration" {
description = "(Optional) Pod node tolerations"
default = []
}
variable "volume_nfs" {
type = list(object({ path_on_nfs = string, nfs_endpoint = string, volume_name = string }))
description = "(Optional) Attach NFS"
default = []
}
variable "volume_host_path" {
description = "(Optional) Attach a file or directory from the host node’s filesystem"
default = []
}
variable "volume_config_map" {
type = list(object({ mode = string, name = string, volume_name = string }))
description = "(Optional) The data stored in a ConfigMap object can be referenced in a volume of type configMap and then consumed by containerized applications running in a Pod"
default = []
}
variable "volume_empty_dir" {
type = list(object({ volume_name = string }))
default = []
}
variable "volume_gce_disk" {
description = "(Optional) Create volume from google disk to pod"
default = []
}
variable "volume_secret" {
description = "(Optional) Create volume from secret"
default = []
}
variable "volume_aws_disk" {
description = "(Optional) Create volume from aws disk to pod"
default = []
}
variable "volume_mount" {
description = "(Optional) Mount path from pods to volume"
default = []
}
variable "env" {
type = map(string)
description = "(Optional) Name and value pairs to set in the container's environment"
default = {}
}
variable "env_field" {
type = map(string)
description = "(Optional) Get field from k8s and add as environment variables to pods"
default = {}
}
variable "env_secret" {
description = "(Optional) Get secret keys from k8s and add as environment variables to pods"
default = {}
}
variable "hosts" {
type = list(object({ hostname = string, ip = string }))
description = "(Optional) Add /etc/hosts records to pods"
default = []
}
variable "internal_port" {
description = "(Optional) Expose port in pods"
default = []
}
variable "security_context" {
description = "(Optional) SecurityContext holds pod-level security attributes and common container settings"
default = []
}
variable "security_context_capabilities" {
description = "(Optional) Security context in pod. Only capabilities."
default = []
}
variable "security_context_container" {
description = "(Optional) Security context in pod."
default = []
}
variable "custom_labels" {
description = "(Optional) Add custom label to pods"
default = null
type = map(string)
}
variable "args" {
type = list(string)
description = "(Optional) Arguments to the entrypoint."
default = []
}
variable "command" {
description = " (Optional) Entrypoint array. Not executed within a shell. "
default = []
}
variable "service_account_token" {
type = bool
description = "Indicates whether a service account token should be automatically mounted"
default = null
}
variable "service_account_name" {
type = string
description = "(Optional) Is the name of the ServiceAccount to use to run this pod"
default = null
}
variable "image_pull_policy" {
default = "IfNotPresent" // Always, Never or empty
description = "he default pull policy is IfNotPresent which causes the Kubelet to skip pulling an image if it already exists. If you would like to always force a pull, you can do one of the following"
}
variable "restart_policy" {
type = string
description = "Restart policy for all containers within the pod. One of Always, OnFailure, Never"
default = "Always"
}
variable "replicas" {
type = number
description = "(Optional) Count of pods"
default = 1
}
variable "resources" {
description = "(Optional) Limit resources by cpu or memory for pods"
default = {}
}
variable "pod_management_policy" {
type = string
description = "(Optional) podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down"
default = null
}
variable "revision_history_limit" {
type = number
description = "(Optional) The maximum number of revisions that will be maintained in the StatefulSet's revision history"
default = null
}
variable "update_strategy_type" {
type = string
description = "(Optional) Indicates the type of the StatefulSetUpdateStrategy. There are two valid update strategies, RollingUpdate and OnDelete"
default = "RollingUpdate"
}
variable "update_strategy_partition" {
type = string
description = "(Optional) Indicates the ordinal at which the StatefulSet should be partitioned. You can perform a phased roll out (e.g. a linear, geometric, or exponential roll out) using a partitioned rolling update in a similar manner to how you rolled out a canary. To perform a phased roll out, set the partition to the ordinal at which you want the controller to pause the update. By setting the partition to 0, you allow the StatefulSet controller to continue the update process"
default = "0"
}
variable "node_selector" {
description = "(Optional) Specify node selector for pod"
type = map(string)
default = null
}
variable "tty" {
default = "true"
}
variable "liveness_probe" {
description = "(Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. "
default = []
}
variable "readiness_probe" {
description = "(Optional) Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. "
default = []
}
variable "lifecycle_events" {
description = "(Optional) Actions that the management system should take in response to container lifecycle events"
default = []
}
variable "image_pull_secrets" {
description = "(Optional) Specify list of pull secrets"
type = map(string)
default = {}
}
variable "termination_grace_period_seconds" {
description = "(Optional) ptional duration in seconds the pod needs to terminate gracefully"
default = null
}
variable "prevent_deploy_on_the_same_node" {
description = "Pod pod_anti_affinity rule, which prevents deploy same pod on one node."
type = bool
default = false
}