diff --git a/init.tf b/init.tf index 0812470..68bfa1a 100644 --- a/init.tf +++ b/init.tf @@ -96,8 +96,8 @@ resource "null_resource" "kustomization" { content = templatefile( "${path.module}/templates/traefik_config.yaml.tpl", { - lb_disable_ipv6 = var.lb_disable_ipv6 - lb_server_type = var.lb_server_type + load_balancer_disable_ipv6 = var.load_balancer_disable_ipv6 + load_balancer_type = var.load_balancer_type location = var.location traefik_acme_tls = var.traefik_acme_tls traefik_acme_email = var.traefik_acme_email diff --git a/templates/traefik_config.yaml.tpl b/templates/traefik_config.yaml.tpl index f8156f8..75ce20f 100644 --- a/templates/traefik_config.yaml.tpl +++ b/templates/traefik_config.yaml.tpl @@ -15,9 +15,9 @@ spec: # keep hetzner-ccm from exposing our private ingress ip, which in general isn't routeable from the public internet "load-balancer.hetzner.cloud/disable-private-ingress": "true" # disable ipv6 by default, because external-dns doesn't support AAAA for hcloud yet https://github.com/kubernetes-sigs/external-dns/issues/2044 - "load-balancer.hetzner.cloud/ipv6-disabled": "${lb_disable_ipv6}" + "load-balancer.hetzner.cloud/ipv6-disabled": "${load_balancer_disable_ipv6}" "load-balancer.hetzner.cloud/location": "${location}" - "load-balancer.hetzner.cloud/type": "${lb_server_type}" + "load-balancer.hetzner.cloud/type": "${load_balancer_type}" "load-balancer.hetzner.cloud/uses-proxyprotocol": "true" additionalArguments: - "--entryPoints.web.proxyProtocol.trustedIPs=127.0.0.1/32,10.0.0.0/8" diff --git a/terraform.tfvars.example b/terraform.tfvars.example index 5ae9930..0f7aa6c 100644 --- a/terraform.tfvars.example +++ b/terraform.tfvars.example @@ -17,7 +17,7 @@ network_subnets = { } control_plane_server_type = "cpx11" -lb_server_type = "lb11" +load_balancer_type = "lb11" # At least 3 server nodes is recommended for HA, otherwise you need to turn off automatic upgrade (see ReadMe). control_plane_count = 3 diff --git a/variables.tf b/variables.tf index a0ed062..627a04e 100644 --- a/variables.tf +++ b/variables.tf @@ -51,12 +51,12 @@ variable "control_plane_count" { } -variable "lb_server_type" { +variable "load_balancer_type" { description = "Default load balancer server type" type = string } -variable "lb_disable_ipv6" { +variable "load_balancer_disable_ipv6" { description = "Disable ipv6 for the load balancer" type = bool default = false