-
Notifications
You must be signed in to change notification settings - Fork 2
/
variables.tf
217 lines (188 loc) · 6.58 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
#######################
## Standard variables
#######################
variable "cluster_name" {
description = "Name given to the cluster. Value used for naming some the resources created by the module."
type = string
}
variable "base_domain" {
description = "Base domain of the cluster. Value used for the ingress' URL of the application."
type = string
}
variable "subdomain" {
description = "Subdomain of the cluster. Value used for the ingress' URL of the application."
type = string
default = "apps"
nullable = false
}
variable "argocd_project" {
description = "Name of the Argo CD AppProject where the Application should be created. If not set, the Application will be created in a new AppProject only for this Application."
type = string
default = null
}
variable "argocd_labels" {
description = "Labels to attach to the Argo CD Application resource."
type = map(string)
default = {}
}
variable "destination_cluster" {
description = "Destination cluster where the application should be deployed."
type = string
default = "in-cluster"
}
variable "target_revision" {
description = "Override of target revision of the application chart."
type = string
default = "v13.0.1" # x-release-please-version
}
variable "cluster_issuer" {
description = "SSL certificate issuer to use. Usually you would configure this value as `letsencrypt-staging` or `letsencrypt-prod` on your root `*.tf` files."
type = string
default = "selfsigned-issuer"
}
variable "helm_values" {
description = "Helm chart value overrides. They should be passed as a list of HCL structures."
type = any
default = []
}
variable "deep_merge_append_list" {
description = "A boolean flag to enable/disable appending lists instead of overwriting them."
type = bool
default = false
}
variable "app_autosync" {
description = "Automated sync options for the Argo CD Application resource."
type = object({
allow_empty = optional(bool)
prune = optional(bool)
self_heal = optional(bool)
})
default = {
allow_empty = false
prune = true
self_heal = true
}
}
variable "dependency_ids" {
type = map(string)
default = {}
}
#######################
## Module variables
#######################
variable "resources" {
description = <<-EOT
Resource limits and requests for kube-prometheus-stack's components. Follow the style on https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/[official documentation] to understand the format of the values.
IMPORTANT: These are not production values. You should always adjust them to your needs.
EOT
type = object({
prometheus = optional(object({
requests = optional(object({
cpu = optional(string, "250m")
memory = optional(string, "512Mi")
}), {})
limits = optional(object({
cpu = optional(string)
memory = optional(string, "1024Mi")
}), {})
}), {})
prometheus_operator = optional(object({
requests = optional(object({
cpu = optional(string, "50m")
memory = optional(string, "128Mi")
}), {})
limits = optional(object({
cpu = optional(string)
memory = optional(string, "128Mi")
}), {})
}), {})
thanos_sidecar = optional(object({
requests = optional(object({
cpu = optional(string, "100m")
memory = optional(string, "256Mi")
}), {})
limits = optional(object({
cpu = optional(string)
memory = optional(string, "512Mi")
}), {})
}), {})
alertmanager = optional(object({
requests = optional(object({
cpu = optional(string, "50m")
memory = optional(string, "128Mi")
}), {})
limits = optional(object({
cpu = optional(string)
memory = optional(string, "256Mi")
}), {})
}), {})
kube_state_metrics = optional(object({
requests = optional(object({
cpu = optional(string, "50m")
memory = optional(string, "128Mi")
}), {})
limits = optional(object({
cpu = optional(string)
memory = optional(string, "128Mi")
}), {})
}), {})
grafana = optional(object({
requests = optional(object({
cpu = optional(string, "250m")
memory = optional(string, "512Mi")
}), {})
limits = optional(object({
cpu = optional(string)
memory = optional(string, "512Mi")
}), {})
}), {})
node_exporter = optional(object({
requests = optional(object({
cpu = optional(string, "50m")
memory = optional(string, "128Mi")
}), {})
limits = optional(object({
cpu = optional(string)
memory = optional(string, "128Mi")
}), {})
}), {})
})
default = {}
}
variable "grafana" {
description = "Grafana settings"
type = any
default = {}
}
variable "prometheus" {
description = "Prometheus settings"
type = any
default = {}
}
variable "alertmanager" {
description = <<-EOT
Object containing Alertmanager settings. The following attributes are supported:
* `enabled`: whether Alertmanager is deployed or not (default: `true`).
* `domain`: domain name configured in the Ingress (default: `prometheus.apps.$${var.cluster_name}.$${var.base_domain}`).
* `oidc`: OIDC configuration to be used by OAuth2 Proxy in front of Alertmanager (**required**).
* `deadmanssnitch_url`: url of a Dead Man's Snitch service Alertmanager should report to (by default this reporing is disabled).
* `slack_routes`: list of objects configuring routing of alerts to Slack channels, with the following attributes:
* `name`: name of the configured route.
* `channel`: channel where the alerts will be sent (with '#').
* `api_url`: slack URL you received when configuring a webhook integration.
* `matchers`: list of strings for filtering which alerts will be sent.
* `continue`: whether an alert should continue matching subsequent sibling nodes.
EOT
type = any
default = {}
}
variable "metrics_storage_main" {
description = "Storage settings for the Thanos sidecar. Needs to be of type `any` because the structure is different depending on the variant used."
type = any
default = {}
}
variable "dataproxy_timeout" {
description = "Variable to set the time when a query times out. This applies to all the Grafana's data sources and can be manually configured per data source if desired."
type = number
default = 30
}