Merge pull request #29 from phaer/ingress-no-private-ip-optional-ipv6

ingress: don't use private ip, make ipv6 optional
This commit is contained in:
Karim Naufal 2022-01-25 21:13:14 +01:00 committed by GitHub
commit 7fbf5a88d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 3 deletions

View File

@ -166,6 +166,7 @@ resource "local_file" "hetzner_csi_config" {
resource "local_file" "traefik_config" {
content = templatefile("${path.module}/templates/traefik_config.yaml.tpl", {
lb_disable_ipv6 = var.lb_disable_ipv6
lb_server_type = var.lb_server_type
location = var.location
})

View File

@ -10,7 +10,12 @@ spec:
type: LoadBalancer
annotations:
"load-balancer.hetzner.cloud/name": "traefik"
# make hetzners load-balancer connect to our nodes via our private k3s-net.
"load-balancer.hetzner.cloud/use-private-ip": "true"
# 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/location": "${location}"
"load-balancer.hetzner.cloud/type": "${lb_server_type}"
"load-balancer.hetzner.cloud/uses-proxyprotocol": "true"

View File

@ -34,6 +34,12 @@ variable "lb_server_type" {
type = string
}
variable "lb_disable_ipv6" {
description = "Disable ipv6 for the load balancer"
type = bool
default = false
}
variable "servers_num" {
description = "Number of control plane nodes."
type = number