forked from lentidas/devops-stack-test-eks-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apps.tf
76 lines (67 loc) · 1.92 KB
/
apps.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
module "helloworld_apps" {
source = "git::https://github.com/camptocamp/devops-stack-module-applicationset.git?ref=v1.2.6"
dependency_ids = {
argocd = module.argocd.id
}
name = "helloworld-apps"
argocd_namespace = module.argocd_bootstrap.argocd_namespace
project_dest_namespace = "*"
project_source_repo = "https://github.com/camptocamp/devops-stack-helloworld-templates.git"
generators = [
{
git = {
repoURL = "https://github.com/camptocamp/devops-stack-helloworld-templates.git"
revision = "main"
directories = [
{
path = "apps/*"
}
]
}
}
]
template = {
metadata = {
name = "{{path.basename}}"
}
spec = {
project = "helloworld-apps"
source = {
repoURL = "https://github.com/camptocamp/devops-stack-helloworld-templates.git"
targetRevision = "main"
path = "{{path}}"
helm = {
valueFiles = []
# The following value defines this global variables that will be available to all apps in apps/*
# These are needed to generate the ingresses containing the name and base domain of the cluster.
values = <<-EOT
cluster:
name: "${local.cluster_name}"
domain: "${local.base_domain}"
issuer: "${local.cluster_issuer}"
apps:
traefik_dashboard: false
grafana: true
prometheus: true
thanos: true
alertmanager: true
EOT
}
}
destination = {
name = "in-cluster"
namespace = "{{path.basename}}"
}
syncPolicy = {
automated = {
allowEmpty = false
selfHeal = true
prune = true
}
syncOptions = [
"CreateNamespace=true"
]
}
}
}
}