From 5b7d22c90da450694536a5db917fc4c1b085939b Mon Sep 17 00:00:00 2001 From: Story Crater Bot <19826264+Riotpiaole@users.noreply.github.com> Date: Sat, 15 Aug 2026 22:46:19 -0700 Subject: [PATCH] =?UTF-8?q?fix(talos):=20indent=20cilium=20inlineManifests?= =?UTF-8?q?=20block=20scalars=20and=20let=20longhorn=5Fdisks=20declare=20a?= =?UTF-8?q?n=20array=20with=20optional=20mountpoint/kind=20=E2=80=94=20the?= =?UTF-8?q?=20scalars=20rendered=20their=20first=20line=20at=20column=200,?= =?UTF-8?q?=20silently=20invalidating=20all=203=20control-plane=20configs?= =?UTF-8?q?=20so=20lb-ippool/l2-announcement=20never=20reached=20any=20nod?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- terraform/templates/controlplane.tftpl | 11 +++++++---- terraform/variables.tf | 20 +++++++++++++++++--- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/terraform/templates/controlplane.tftpl b/terraform/templates/controlplane.tftpl index 0d998fd..8669820 100644 --- a/terraform/templates/controlplane.tftpl +++ b/terraform/templates/controlplane.tftpl @@ -49,12 +49,15 @@ machine: image: factory.talos.dev/installer/613e1592b2da41ae5e265e8789429f22e121aab91cb4deb6bc3c0b6262961245:${talos_version} wipe: true grubUseUKICmdline: true +%{ if length(longhorn_disks) > 0 ~} disks: -%{ for disk in longhorn_disks ~} +%{ for idx, disk in longhorn_disks ~} + # ${disk.kind} — ${disk.device} - device: ${disk.device} partitions: - - mountpoint: ${disk.mountpoint} + - mountpoint: ${coalesce(disk.mountpoint, format("/var/lib/longhorn-disk%d", idx + 1))} %{ endfor ~} +%{ endif ~} features: diskQuotaSupport: true kubePrism: @@ -172,10 +175,10 @@ cluster: # kubectl); moved here so LB-IPAM exists before any LoadBalancer Service syncs. - name: cilium-lb-ippool contents: | -${indent(8, cilium_lb_ippool)} + ${indent(8, cilium_lb_ippool)} - name: cilium-l2-announcement contents: | -${indent(8, cilium_l2_announcement)} + ${indent(8, cilium_l2_announcement)} # CoreDNS Corefile with homelab hostname rewrites (single source of truth in # terraform/files/coredns/Corefile). In-cluster pods resolve *.riotpiao.com to # the nginx ingress controller so OIDC auto-discovery against diff --git a/terraform/variables.tf b/terraform/variables.tf index fc40506..8693c03 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -107,10 +107,24 @@ variable "controlplane_configs" { lan_subnet = string lan_gateway = string install_disk = string - longhorn_disks = list(object({ + # Longhorn data disks, in mountpoint order. `device` should be a stable + # /dev/disk/by-id/wwn-* path: this hardware enumerates /dev/sdX by discovery + # order, and `install.wipe: true` means a renumber can aim the installer at a + # data disk. + # + # `mountpoint` defaults to /var/lib/longhorn-disk by position. Never + # renumber or reorder existing entries — Longhorn keys its disks off the + # mountpoint, so a rename orphans the replicas already on that disk. Append + # new disks to the end. + # + # `kind` ("ssd"/"hdd") is a declared label only. PERC RAID controllers report + # every disk as rotational, so it can't be autodetected, and it deliberately + # does not affect ordering or mountpoints. + longhorn_disks = optional(list(object({ device = string - mountpoint = string - })) + mountpoint = optional(string) + kind = optional(string, "hdd") + })), []) zone = string allow_scheduling = bool # Extra cert SANs for this node — e.g. Cloudflare Tunnel public hostnames so