-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
123 lines (116 loc) · 3.32 KB
/
variables.tf
File metadata and controls
123 lines (116 loc) · 3.32 KB
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
variable "hide_fields" {
type = list(string)
default = [
"apiVersion",
"kind",
"metadata",
"spec",
]
description = "Hide the diff output of terraform by marking it as sensitive. Useful for less cluttered terraform output. See https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/kubectl_manifest#sensitive-fields for details."
}
variable "server_side_apply" {
type = bool
default = true
description = "Apply using server-side-apply method."
}
variable "force_conflicts" {
type = bool
default = true
description = "Apply using force-conflicts flag."
}
variable "apply_only" {
type = bool
default = true
description = "Apply only, prevents destruction of CRDs."
}
variable "force_new" {
type = bool
default = false
description = "Forces delete & create of resources if the CRD manifest changes."
}
variable "charts" {
type = map(object({
repository = string
version = string
enabled = optional(bool, true)
values = optional(list(string), [""])
set = optional(list(object({
name = string
value = optional(string)
type = optional(string)
})), [])
set_list = optional(list(object({
name = string
value = list(string)
})), [])
set_sensitive = optional(list(object({
name = string
value = string
type = optional(string)
})), [])
}))
default = {}
description = "A map of additional charts and their parameters to extract CRDs from. (Please ensure that the CRD flags are set to true for the charts)"
}
variable "default_chart_overrides" {
type = map(any)
default = {}
description = "Overrides for the default charts. Supported parameters are: repository, version, enabled, values, set and set_sensitive. (see https://registry.terraform.io/providers/hashicorp/helm/latest/docs/data-sources/template)"
}
locals {
default_charts = {
cert-manager = {
repository = "https://charts.iits.tech"
version = "1.16.1"
enabled = true
values = [""]
set = [{
name = "cert-manager.installCRDs"
value = true
type = "auto"
}]
set_list = []
set_sensitive = []
}
traefik = {
repository = "https://charts.iits.tech"
version = "34.2.0"
enabled = true
values = [""]
set = [{
name = "traefik.metrics.prometheus.disableAPICheck"
value = true
type = "auto"
}]
set_list = []
set_sensitive = []
}
kyverno = {
repository = "https://charts.iits.tech"
version = "2.2.2"
enabled = true
values = [""]
set = [{
name = "kyverno.crds.install"
value = true
type = "auto"
}]
set_list = []
set_sensitive = []
}
prometheus-stack = {
repository = "https://charts.iits.tech"
version = "62.6.0"
enabled = true
values = [""]
set = [{
name = "prometheusStack.crds.enabled"
value = true
type = "auto"
}]
set_list = []
set_sensitive = []
}
}
charts_merged = merge({ for chart, params in local.default_charts : chart => merge(params, lookup(var.default_chart_overrides, chart, null)) }, var.charts)
}