diff --git a/modules/kubernetes/main.tf b/modules/kubernetes/main.tf index a1ecfa79..c40e2440 100644 --- a/modules/kubernetes/main.tf +++ b/modules/kubernetes/main.tf @@ -52,7 +52,7 @@ variable "finance_app_gocardless_secret_key" {} resource "null_resource" "core_services" { # List all the core modules that must be provisioned first - depends_on = [module.metallb, module.bind] + depends_on = [module.metallb] } module "blog" { @@ -63,12 +63,12 @@ module "blog" { depends_on = [null_resource.core_services] } -module "bind" { - source = "./bind" - db_viktorbarzin_me = var.bind_db_viktorbarzin_me - db_viktorbarzin_lan = var.bind_db_viktorbarzin_lan - named_conf_options = var.bind_named_conf_options -} +# module "bind" { +# source = "./bind" +# db_viktorbarzin_me = var.bind_db_viktorbarzin_me +# db_viktorbarzin_lan = var.bind_db_viktorbarzin_lan +# named_conf_options = var.bind_named_conf_options +# } module "dbaas" { source = "./dbaas" diff --git a/modules/kubernetes/technitium/main.tf b/modules/kubernetes/technitium/main.tf index 7ef1f3f7..20de031e 100644 --- a/modules/kubernetes/technitium/main.tf +++ b/modules/kubernetes/technitium/main.tf @@ -12,7 +12,8 @@ module "tls_secret" { tls_secret_name = var.tls_secret_name } -resource "kubernetes_deployment" "technitium" { +# resource "kubernetes_deployment" "technitium" { +resource "kubernetes_daemonset" "technitium" { metadata { name = "technitium" namespace = "technitium" @@ -21,7 +22,7 @@ resource "kubernetes_deployment" "technitium" { } } spec { - replicas = 1 + # replicas = 1 selector { match_labels = { app = "technitium" @@ -38,14 +39,14 @@ resource "kubernetes_deployment" "technitium" { image = "technitium/dns-server:latest" name = "technitium" resources { - limits = { - cpu = "1" - memory = "1Gi" - } - requests = { - cpu = "1" - memory = "1Gi" - } + # limits = { + # cpu = "1" + # memory = "1Gi" + # } + # requests = { + # cpu = "1" + # memory = "1Gi" + # } } port { container_port = 5380 @@ -110,8 +111,9 @@ resource "kubernetes_service" "technitium-dns" { } spec { - type = "LoadBalancer" - external_traffic_policy = "Cluster" + type = "LoadBalancer" + # external_traffic_policy = "Cluster" + external_traffic_policy = "Local" selector = { app = "technitium" @@ -129,7 +131,8 @@ resource "kubernetes_ingress_v1" "technitium" { name = "technitium-ingress" namespace = "technitium" annotations = { - "kubernetes.io/ingress.class" = "nginx" + "kubernetes.io/ingress.class" = "nginx" + "nginx.ingress.kubernetes.io/affinity" = "cookie" "nginx.ingress.kubernetes.io/auth-tls-verify-client" = "on" "nginx.ingress.kubernetes.io/auth-tls-secret" = "default/ca-secret" } diff --git a/terraform.tfstate b/terraform.tfstate index 0d887e6f..879b185a 100644 Binary files a/terraform.tfstate and b/terraform.tfstate differ diff --git a/terraform.tfvars b/terraform.tfvars index ea1878ef..568df551 100644 Binary files a/terraform.tfvars and b/terraform.tfvars differ