tweaked traefik name to align with the rest of the ressources

This commit is contained in:
Karim Naufal 2022-03-05 03:23:42 +01:00
parent 34eb575223
commit b2d160f33a
3 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ resource "null_resource" "kustomization" {
content = local.is_single_node_cluster ? "" : templatefile(
"${path.module}/templates/traefik_config.yaml.tpl",
{
cluster_pet_name = random_pet.cluster.id
name = "k3s-${random_pet.cluster.id}-traefik"
load_balancer_disable_ipv6 = var.load_balancer_disable_ipv6
load_balancer_type = var.load_balancer_type
location = var.location

View File

@ -51,7 +51,7 @@ resource "hcloud_placement_group" "k3s" {
data "hcloud_load_balancer" "traefik" {
count = local.is_single_node_cluster ? 0 : 1
name = "traefik-${random_pet.cluster.id}"
name = "k3s-${random_pet.cluster.id}-traefik"
depends_on = [null_resource.kustomization]
}

View File

@ -9,7 +9,7 @@ spec:
enabled: true
type: LoadBalancer
annotations:
"load-balancer.hetzner.cloud/name": "traefik-${cluster_pet_name}"
"load-balancer.hetzner.cloud/name": name
# make hetzners load-balancer connect to our nodes via our private k3s
"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