-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhelm_release-external-dns.tf
61 lines (49 loc) · 1.06 KB
/
helm_release-external-dns.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
resource "kubernetes_namespace" "external-dns" {
metadata {
name = "external-dns"
}
}
resource "kubernetes_secret" "external-dns-secrets" {
metadata {
name = "external-dns-secrets"
namespace = kubernetes_namespace.external-dns.metadata[0].name
}
data = {
token = var.civo_token
}
depends_on = [kubernetes_namespace.external-dns]
}
resource "helm_release" "external-dns" {
name = "external-dns"
repository = "https://kubernetes-sigs.github.io/external-dns/"
chart = "external-dns"
namespace = "external-dns"
set {
name = "provider"
value = "civo"
}
set {
name = "sources[0]"
value = "ingress"
}
set {
name = "domainFilters[0]"
value = var.domain
}
set {
name = "env[0].name"
value = "CIVO_TOKEN"
}
set {
name = "env[0].valueFrom.secretKeyRef.name"
value = "external-dns-secrets"
}
set {
name = "env[0].valueFrom.secretKeyRef.key"
value = "token"
}
depends_on = [
kubernetes_namespace.external-dns,
kubernetes_secret.external-dns-secrets
]
}