tweaked traefik name to align with the rest of the ressources
This commit is contained in:
parent
34eb575223
commit
b2d160f33a
2
init.tf
2
init.tf
@ -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
|
||||
|
2
main.tf
2
main.tf
@ -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]
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user