-
Notifications
You must be signed in to change notification settings - Fork 0
/
falco.tf
45 lines (39 loc) · 1.06 KB
/
falco.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
# variables
variable "install_falco" {
description = "Install Falco"
type = bool
default = false
}
variable "falco" {
description = "Map for overriding Falco Helm chart settings"
type = object({
name = optional(string, "falco")
repository = optional(string, "oci://cr.yandex/yc-marketplace")
chart = optional(string, "falco")
version = optional(string, "2.2.5")
namespace = optional(string, "falco")
falco_sidekick_enabled = optional(bool, false)
falco_sidekick_replicacount = optional(number, 1)
})
default = {}
}
# helm
resource "helm_release" "falco" {
count = var.install_falco ? 1 : 0
name = var.falco.name
repository = var.falco.repository
chart = var.falco.chart
version = var.falco.version
namespace = var.falco.namespace
create_namespace = true
values = [
yamlencode(
{
falcosidekick = {
enabled = var.falco.falco_sidekick_enabled
replicaCount = tonumber(var.falco.falco_sidekick_replicacount)
}
}
)
]
}