Add support for nginx streams

This commit is contained in:
2025-06-16 23:19:25 +02:00
parent b813cf8eda
commit c162944a73
10 changed files with 136 additions and 7 deletions
+10 -7
View File
@@ -45,7 +45,10 @@ resource "kubernetes_deployment" "dns" {
}
strategy {
type = "Recreate"
type = "RollingUpdate"
rolling_update {
max_unavailable = 1
}
}
template {
@@ -112,14 +115,12 @@ resource "kubernetes_deployment" "dns" {
port {
name = "dns-tcp"
container_port = 53
host_port = 53
protocol = "TCP"
}
port {
name = "dns-udp"
container_port = 53
host_port = 53
protocol = "UDP"
}
@@ -157,11 +158,15 @@ resource "kubernetes_deployment" "dns" {
}
}
}
lifecycle {
ignore_changes = [spec[0].template[0].metadata[0].annotations["kubectl.kubernetes.io/restartedAt"]]
}
}
resource "kubernetes_service" "dns" {
resource "kubernetes_service" "dns_internal" {
metadata {
name = "dns-ports"
name = "dns"
namespace = kubernetes_namespace.dns.metadata[0].name
}
@@ -183,8 +188,6 @@ resource "kubernetes_service" "dns" {
port = 53
target_port = 53
}
type = "LoadBalancer"
}
lifecycle {
@@ -36,3 +36,9 @@ variable "zones" {
}))
default = []
}
variable "external_dns_enabled" {
description = "Enable listening on port 53 on the loadbalancer for external DNS resolution"
type = bool
default = false
}