diff --git a/control_planes.tf b/control_planes.tf index a19b212..c410fe8 100644 --- a/control_planes.tf +++ b/control_planes.tf @@ -14,7 +14,7 @@ module "control_planes" { ipv4_subnet_id = hcloud_network_subnet.subnet["control_plane"].id # We leave some room so 100 eventual Hetzner LBs that can be created perfectly safely - # It leaves the subnet with 254 x 254 - 100 = 64416 IPs to use, so probably enough. + # It leaves the subnet with 254 x 254 - 100 = 64416 IPs to use, so probably enough. private_ipv4 = cidrhost(var.network_ipv4_subnets["control_plane"], count.index + 101) labels = { @@ -48,7 +48,7 @@ resource "null_resource" "control_planes" { server = "https://${element(module.control_planes.*.private_ipv4_address, count.index > 0 ? 0 : 1)}:6443" token = random_password.k3s_token.result disable-cloud-controller = true - disable = ["servicelb", "local-storage"] + disable = ["servicelb", "local-storage", "traefik", "metric-server"] flannel-iface = "eth1" kubelet-arg = "cloud-provider=external" node-ip = module.control_planes[count.index].private_ipv4_address diff --git a/init.tf b/init.tf index 92ab81c..3ccc6fe 100644 --- a/init.tf +++ b/init.tf @@ -91,7 +91,7 @@ resource "null_resource" "kustomization" { # Upload traefik config provisioner "file" { - content = local.is_single_node_cluster ? "" : var.traefik_enabled == false ? "" : templatefile( + content = local.is_single_node_cluster || var.traefik_enabled == false ? "" : templatefile( "${path.module}/templates/traefik_config.yaml.tpl", { name = "${var.cluster_name}-traefik" @@ -142,7 +142,7 @@ resource "null_resource" "kustomization" { "kubectl -n system-upgrade wait --for=condition=available --timeout=120s deployment/system-upgrade-controller", "kubectl -n system-upgrade apply -f /tmp/post_install/plans.yaml" ], - local.is_single_node_cluster ? [] : var.traefik_enabled == false ? [] : [<<-EOT + local.is_single_node_cluster || var.traefik_enabled == false ? [] : [<<-EOT timeout 120 bash < /dev/null)" ]; do echo "Waiting for load-balancer to get an IP..."