-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonitoring_system.tf
63 lines (57 loc) · 1.45 KB
/
monitoring_system.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
##
## monitoring-system
##
resource "kubernetes_namespace" "monitoring_system" {
metadata {
name = "monitoring-system"
labels = {
"istio-injection" = "enabled"
"namespace.statcan.gc.ca/purpose" = "daaas"
"network.statcan.gc.ca/allow-ingress-controller" = "true"
}
}
}
module "namespace_monitoring_system" {
source = "git::https://github.com/canada-ca-terraform-modules/terraform-kubernetes-namespace.git?ref=v2.2.0"
name = kubernetes_namespace.monitoring_system.id
namespace_admins = {
users = []
groups = ["XXX"]
}
# CI/CD
ci_name = "ci"
# Dependencies
dependencies = []
}
resource "kubectl_manifest" "monitoring_system_application" {
yaml_body = <<YAML
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: monitoring-system
namespace: daaas-system
spec:
project: default
destination:
namespace: monitoring-system
server: https://kubernetes.default.svc
source:
repoURL: 'https://github.com/StatCan/aaw-argocd-manifests'
path: monitoring-system
targetRevision: "aaw-prod-cc-00"
directory:
recurse: true
jsonnet:
extVars:
- name: targetRevision
value: $ARGOCD_APP_SOURCE_TARGET_REVISION
- name: folder
value: $ARGOCD_APP_SOURCE_PATH
- name: url
value: $ARGOCD_APP_SOURCE_REPO_URL
syncPolicy:
automated:
prune: true
selfHeal: true
YAML
}