-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.tf
75 lines (74 loc) · 2.18 KB
/
config.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
terraform {
backend "local" {
path = "./terraform.tfstate"
}
}
locals {
kube_config = {
config_path = "~/.kube/config"
config_context = "minikube"
}
namespaces = ["demo-echo-server", "demo-python-app", "demo-monitoring", "demo-loki"]
helm_releases_tmpl = {
monitoring = {
enabled = var.monitoring_helm_enabled
chart = "./monitoring-helm"
namespace = "demo-monitoring"
atomic = false
cleanup_on_fail = false
values = [
file("./monitoring-helm/values.yaml")
]
}
echo-server = {
enabled = var.echo_nginx_server_helm_enabled
repository = "https://ealenn.github.io/charts"
chart = "echo-server"
version = "0.5.0"
atomic = false
cleanup_on_fail = true
namespace = "demo-echo-server"
}
python-demo-logs-app = {
enabled = var.py_logging_helm_enabled
chart = "./demo-services/python-app/deployment"
atomic = false
cleanup_on_fail = true
namespace = "demo-python-app"
override_values = {
"pdb.maxUnavailable" = "1"
"gh_packages_token" = var.py_logging_gh_token
}
}
loki = {
enabled = var.loki_helm_enabled
repository = "https://grafana.github.io/helm-charts"
chart = "loki"
version = "6.5.0"
atomic = false
cleanup_on_fail = false
namespace = "demo-loki"
values = [
templatefile("./logging/values-loki.tfpl",
{
minio_enabled = true
minio_replicas = 1
minio_size_gb = 2
})
]
}
promtail = {
enabled = var.loki_helm_enabled
repository = "https://grafana.github.io/helm-charts"
chart = "promtail"
version = "6.15.5"
atomic = false
cleanup_on_fail = false
namespace = "demo-loki"
values = [
templatefile("./logging/values-promtail.tfpl", {})
]
}
}
helm_releases = { for k, v in local.helm_releases_tmpl : k => v if v.enabled == true }
}