infrastructure/k8s.tjo.cloud/modules/cluster-components/external-dns.tf

71 lines
1.8 KiB
Terraform
Raw Normal View History

2024-08-04 17:50:50 +00:00
resource "helm_release" "external-dns-privileged" {
name = "external-dns-privileged"
chart = "external-dns"
repository = "https://kubernetes-sigs.github.io/external-dns/"
2024-12-22 12:32:22 +00:00
version = "v1.15.0"
2024-08-04 17:50:50 +00:00
namespace = kubernetes_namespace.tjo-cloud.metadata[0].name
values = [<<-EOF
2025-01-03 20:59:46 +00:00
provider: dnsimple
2024-08-04 17:50:50 +00:00
env:
2025-01-03 18:27:34 +00:00
- name: DNSIMPLE_OAUTH
2024-08-04 17:50:50 +00:00
valueFrom:
secretKeyRef:
2025-01-03 18:27:34 +00:00
name: ${kubernetes_secret.dnsimple.metadata[0].name}
2024-08-04 17:50:50 +00:00
key: token
2025-01-03 18:27:34 +00:00
- name: DNSIMPLE_ACCOUNT_ID
valueFrom:
secretKeyRef:
name: ${kubernetes_secret.dnsimple.metadata[0].name}
key: account_id
- name: DNSIMPLE_ZONES
2025-01-04 10:03:37 +00:00
value: "k8s.tjo.cloud"
2024-08-04 17:50:50 +00:00
sources:
- ingress
- service
2024-12-22 12:32:22 +00:00
- gateway-httproute
- gateway-grpcroute
- gateway-tlsroute
- gateway-tcproute
2024-08-04 17:50:50 +00:00
domainFilters:
- k8s.tjo.cloud
- internal.k8s.tjo.cloud
EOF
]
}
resource "helm_release" "external-dns-user-content" {
name = "external-dns-user-content"
chart = "external-dns"
repository = "https://kubernetes-sigs.github.io/external-dns/"
2024-12-22 12:32:22 +00:00
version = "v1.15.0"
2024-08-04 17:50:50 +00:00
namespace = kubernetes_namespace.tjo-cloud.metadata[0].name
values = [<<-EOF
2025-01-03 18:27:34 +00:00
provider: dnsimple
2024-08-04 17:50:50 +00:00
env:
2025-01-03 18:27:34 +00:00
- name: DNSIMPLE_OAUTH
2024-08-04 17:50:50 +00:00
valueFrom:
secretKeyRef:
2025-01-03 18:27:34 +00:00
name: ${kubernetes_secret.dnsimple.metadata[0].name}
2024-08-04 17:50:50 +00:00
key: token
2025-01-03 18:27:34 +00:00
- name: DNSIMPLE_ACCOUNT_ID
valueFrom:
secretKeyRef:
name: ${kubernetes_secret.dnsimple.metadata[0].name}
key: account_id
- name: DNSIMPLE_ZONES
value: "user-content.tjo.cloud"
2024-08-04 17:50:50 +00:00
sources:
- ingress
- service
2024-12-22 12:32:22 +00:00
- gateway-httproute
- gateway-grpcroute
- gateway-tlsroute
- gateway-tcproute
2024-08-04 17:50:50 +00:00
domainFilters:
- user-content.tjo.cloud
EOF
]
}