From c533c7c070a8f0bf16d9af8323e893ad548396c8 Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Mon, 15 Dec 2025 16:00:39 +0100 Subject: [PATCH 01/20] feat: Add config for persistent storage --- pve01.wheatley.in/k8s-wheatley/main.tf | 3 ++- .../k8s-wheatley/modules/talos-bootstrap/main.tf | 1 + .../templates/machineconfig-worker.yaml.tmpl | 9 ++++++++- .../k8s-wheatley/modules/talos-bootstrap/variables.tf | 1 + pve01.wheatley.in/templates/talos/schematic.yaml | 1 + 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pve01.wheatley.in/k8s-wheatley/main.tf b/pve01.wheatley.in/k8s-wheatley/main.tf index bdf409e..bbf6456 100644 --- a/pve01.wheatley.in/k8s-wheatley/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/main.tf @@ -64,7 +64,7 @@ locals { cluster_name = local.cluster_name kubernetes_version = local.kubernetes_version ipv4_gateway = local.ipv4_gateway - pvc_disks = [100] + pvc_disks = [150] nodes = [ { @@ -164,6 +164,7 @@ module "talos-bootstrap" { name = format("k8s-wheatley-%s", node.name) type = "worker" ipv4_address = node.ip_address + pvc_disks = local.workers.pvc_disks } ] ) diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf index 1563085..a5da642 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf @@ -83,6 +83,7 @@ resource "talos_machine_configuration_apply" "config_apply_worker" { gateway-api_version = var.node_config.gateway_api_version cilium_version = var.node_config.cilium_version cilium_install_file = file("${path.module}/templates/cilium-install.yaml.tmpl") + pvc_disks = each.value.pvc_disks }) ] } diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl index 3637e5b..993a531 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl @@ -3,7 +3,7 @@ machine: type: ${machine_type} install: disk: /dev/vda - image: factory.talos.dev/nocloud-installer-secureboot/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v${talos_version} + image: factory.talos.dev/nocloud-installer-secureboot/6adc7e7fba27948460e2231e5272e88b85159da3f3db980551976bf9898ff64b:v${talos_version} network: hostname: ${hostname} nameservers: @@ -15,6 +15,13 @@ machine: extraConfig: imageGCHighThresholdPercent: 75 imageGCLowThresholdPercent: 70 + kernel: + modules: + - name: drbd + parameters: + - usermode_helper=disabled + - name: drbd_transport_tcp + - name: dm_thin_pool nodeLabels: topology.kubernetes.io/region: ${cluster_name} topology.kubernetes.io/zone: ${node_name} diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf index 34fb8e1..1bd8b0f 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf @@ -20,5 +20,6 @@ variable "talos_nodes" { name = string type = string ipv4_address = string + pvc_disks = optional(list(number)), })) } diff --git a/pve01.wheatley.in/templates/talos/schematic.yaml b/pve01.wheatley.in/templates/talos/schematic.yaml index f27af6e..9f77c1c 100644 --- a/pve01.wheatley.in/templates/talos/schematic.yaml +++ b/pve01.wheatley.in/templates/talos/schematic.yaml @@ -1,4 +1,5 @@ customization: systemExtensions: officialExtensions: + - siderolabs/drbd - siderolabs/qemu-guest-agent From 30d3b3b478bbbb870555fb888a466db544f89a40 Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Mon, 15 Dec 2025 16:15:11 +0100 Subject: [PATCH 02/20] feat: Add storage nic to worker nodes --- pve01.wheatley.in/k8s-wheatley/main.tf | 2 ++ .../k8s-wheatley/modules/talos-node/main.tf | 15 +++++++++++++++ .../k8s-wheatley/modules/talos-node/variables.tf | 1 + 3 files changed, 18 insertions(+) diff --git a/pve01.wheatley.in/k8s-wheatley/main.tf b/pve01.wheatley.in/k8s-wheatley/main.tf index bbf6456..d5a9bc1 100644 --- a/pve01.wheatley.in/k8s-wheatley/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/main.tf @@ -93,6 +93,7 @@ module "controlplanes" { node = { id = local.vm-id_prefix + 10 + tonumber(replace(each.key, "cp", "")) + type = "controlplane" name = format("k8s-wheatley-%s", each.value.name) ipv4_address = each.value.ip_address cpu = local.controlplanes.cpu @@ -114,6 +115,7 @@ module "workers" { node = { id = local.vm-id_prefix + 20 + tonumber(replace(each.key, "worker", "")) + type = "worker" name = format("k8s-wheatley-%s", each.value.name) ipv4_address = each.value.ip_address cpu = local.workers.cpu diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf index 020a5f5..abf0934 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf @@ -45,6 +45,21 @@ resource "proxmox_virtual_environment_vm" "talos-node" { } } + network_device { + bridge = "vmbr1" + model = "virtio" + mtu = 1500 + } + + dynamic "network_device" { + for_each = var.node.type == "worker" ? [1] : [] + content { + bridge = "vmbr2" + model = "virtio" + mtu = 9000 + } + } + initialization { datastore_id = var.node.storagepool ip_config { diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-node/variables.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-node/variables.tf index 389306f..84c1013 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-node/variables.tf +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-node/variables.tf @@ -2,6 +2,7 @@ variable "node" { description = "Basic configuration for the Talos node" type = object({ id = number + type = string name = string ipv4_address = string ipv4_gateway = string From 628443c06c65fffa8a64aa42c86364273b8495d2 Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Mon, 15 Dec 2025 18:23:22 +0100 Subject: [PATCH 03/20] feat: Manage storage nic config through machineconfig --- pve01.wheatley.in/k8s-wheatley/main.tf | 24 +++++++++++-------- .../modules/talos-bootstrap/main.tf | 1 + .../templates/machineconfig-worker.yaml.tmpl | 8 +++++++ .../modules/talos-bootstrap/variables.tf | 9 +++---- 4 files changed, 28 insertions(+), 14 deletions(-) diff --git a/pve01.wheatley.in/k8s-wheatley/main.tf b/pve01.wheatley.in/k8s-wheatley/main.tf index d5a9bc1..6e63247 100644 --- a/pve01.wheatley.in/k8s-wheatley/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/main.tf @@ -68,16 +68,19 @@ locals { nodes = [ { - name = "worker01" - ip_address = "10.13.37.21" + name = "worker01" + ip_address = "10.13.37.21" + storage_address = "10.0.69.21" }, { - name = "worker02" - ip_address = "10.13.37.22" + name = "worker02" + ip_address = "10.13.37.22" + storage_address = "10.0.69.22" }, { - name = "worker03" - ip_address = "10.13.37.23" + name = "worker03" + ip_address = "10.13.37.23" + storage_address = "10.0.69.23" }, ] } @@ -163,10 +166,11 @@ module "talos-bootstrap" { ], [ for node in local.workers.nodes : { - name = format("k8s-wheatley-%s", node.name) - type = "worker" - ipv4_address = node.ip_address - pvc_disks = local.workers.pvc_disks + name = format("k8s-wheatley-%s", node.name) + type = "worker" + ipv4_address = node.ip_address + storage_address = node.storage_address + pvc_disks = local.workers.pvc_disks } ] ) diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf index a5da642..fed2237 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf @@ -78,6 +78,7 @@ resource "talos_machine_configuration_apply" "config_apply_worker" { cluster_name = var.node_config.cluster_name vip_address = var.node_config.cluster_endpoint node_name = format("%s.wheatley.in", var.node_config.proxmox_node) + storage_address = each.value.storage_address machine_type = each.value.type talos_version = var.node_config.talos_version gateway-api_version = var.node_config.gateway_api_version diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl index 993a531..aca6c48 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl @@ -8,6 +8,14 @@ machine: hostname: ${hostname} nameservers: - 9.9.9.9 +%{ if storage_address != false ~} + interfaces: + - interface: eth1 + mtu: 9000 + dhcp: false + addresses: + - ${storage_address}/24 +%{ endif ~} kubelet: extraArgs: pod-max-pids: 1000 diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf index 1bd8b0f..9fb3342 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf @@ -17,9 +17,10 @@ variable "node_config" { variable "talos_nodes" { description = "List of Talos nodes to bootstrap" type = list(object({ - name = string - type = string - ipv4_address = string - pvc_disks = optional(list(number)), + name = string + type = string + ipv4_address = string + storage_address = optional(string) + pvc_disks = optional(list(number)), })) } From f2acafd737caed9b6b6c9b2cce0561cb8330e1dc Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Tue, 16 Dec 2025 21:23:01 +0100 Subject: [PATCH 04/20] fix: Ensure correct nodeIPs are set on workernodes --- pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf | 1 - .../talos-bootstrap/templates/machineconfig-worker.yaml.tmpl | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf index fed2237..117a5ae 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf @@ -76,7 +76,6 @@ resource "talos_machine_configuration_apply" "config_apply_worker" { templatefile("${path.module}/templates/machineconfig-worker.yaml.tmpl", { hostname = each.value.name cluster_name = var.node_config.cluster_name - vip_address = var.node_config.cluster_endpoint node_name = format("%s.wheatley.in", var.node_config.proxmox_node) storage_address = each.value.storage_address machine_type = each.value.type diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl index aca6c48..65e4900 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl @@ -23,6 +23,9 @@ machine: extraConfig: imageGCHighThresholdPercent: 75 imageGCLowThresholdPercent: 70 + nodeIP: + validSubnets: + - 10.13.37.0/24 kernel: modules: - name: drbd From 0e37a6419831887e054f65fa758a70facf8e27d3 Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Sat, 20 Dec 2025 19:35:37 +0100 Subject: [PATCH 05/20] chore: Refactor templates into modules --- .../templates/{talos => }/.terraform.lock.hcl | 3 +- pve01.wheatley.in/templates/main.tf | 25 +++++++++++ .../templates/{talos => }/providers.tf | 0 pve01.wheatley.in/templates/talos/main.tf | 41 +++++-------------- .../templates/talos/variables.tf | 11 ++--- pve01.wheatley.in/templates/variables.tf | 8 ++++ 6 files changed, 49 insertions(+), 39 deletions(-) rename pve01.wheatley.in/templates/{talos => }/.terraform.lock.hcl (97%) create mode 100644 pve01.wheatley.in/templates/main.tf rename pve01.wheatley.in/templates/{talos => }/providers.tf (100%) create mode 100644 pve01.wheatley.in/templates/variables.tf diff --git a/pve01.wheatley.in/templates/talos/.terraform.lock.hcl b/pve01.wheatley.in/templates/.terraform.lock.hcl similarity index 97% rename from pve01.wheatley.in/templates/talos/.terraform.lock.hcl rename to pve01.wheatley.in/templates/.terraform.lock.hcl index 9f1211b..a6f5d9e 100644 --- a/pve01.wheatley.in/templates/talos/.terraform.lock.hcl +++ b/pve01.wheatley.in/templates/.terraform.lock.hcl @@ -25,7 +25,8 @@ provider "registry.opentofu.org/bpg/proxmox" { } provider "registry.opentofu.org/hashicorp/http" { - version = "3.5.0" + version = "3.5.0" + constraints = "3.5.0" hashes = [ "h1:eClUBisXme48lqiUl3U2+H2a2mzDawS9biqfkd9synw=", "zh:0a2b33494eec6a91a183629cf217e073be063624c5d3f70870456ddb478308e9", diff --git a/pve01.wheatley.in/templates/main.tf b/pve01.wheatley.in/templates/main.tf new file mode 100644 index 0000000..f07e7ab --- /dev/null +++ b/pve01.wheatley.in/templates/main.tf @@ -0,0 +1,25 @@ +terraform { + backend "s3" { + bucket = "13225-wheatley-states" + key = "pve01-templates.tfstate" + region = "main" + skip_credentials_validation = true + skip_metadata_api_check = true + skip_region_validation = true + force_path_style = true + } +} + +provider "proxmox" { + endpoint = var.proxmox_endpoint + api_token = var.proxmox_api_token + ssh { + agent = true + username = "tofu" + } +} + +module "talos" { + source = "./talos" + talos_versions = ["1.11.5"] +} diff --git a/pve01.wheatley.in/templates/talos/providers.tf b/pve01.wheatley.in/templates/providers.tf similarity index 100% rename from pve01.wheatley.in/templates/talos/providers.tf rename to pve01.wheatley.in/templates/providers.tf diff --git a/pve01.wheatley.in/templates/talos/main.tf b/pve01.wheatley.in/templates/talos/main.tf index 61cbd78..bafe748 100644 --- a/pve01.wheatley.in/templates/talos/main.tf +++ b/pve01.wheatley.in/templates/talos/main.tf @@ -1,29 +1,12 @@ terraform { - backend "s3" { - bucket = "13225-wheatley-states" - key = "pve01-templates.tfstate" - region = "main" - skip_credentials_validation = true - skip_metadata_api_check = true - skip_region_validation = true - force_path_style = true + required_providers { + proxmox = { + source = "bpg/proxmox" + version = "0.86.0" + } } } -provider "proxmox" { - endpoint = var.proxmox_endpoint - api_token = var.proxmox_api_token - ssh { - agent = true - username = "root" - } -} - - -locals { - talos_versions = ["1.11.5"] -} - data "http" "schematic" { url = "https://factory.talos.dev/schematics" method = "POST" @@ -40,21 +23,20 @@ locals { } resource "proxmox_virtual_environment_download_file" "talos-image" { - for_each = toset(local.talos_versions) + for_each = toset(var.talos_versions) node_name = "pve01" datastore_id = "local" content_type = "iso" - url = "https://factory.talos.dev/image/${local.schematic_id}/v${each.value}/nocloud-amd64-secureboot.raw.gz" - file_name = "talos-${each.value}-nocloud-amd64-secureboot.img" - decompression_algorithm = "gz" + url = "https://factory.talos.dev/image/${local.schematic_id}/v${each.value}/nocloud-amd64-secureboot.iso" + file_name = "talos-${each.value}-nocloud-amd64-secureboot.iso" } resource "proxmox_virtual_environment_vm" "talos-template" { depends_on = [proxmox_virtual_environment_download_file.talos-image] - for_each = toset(local.talos_versions) + for_each = toset(var.talos_versions) template = true vm_id = 10000 + tonumber(replace(each.value, ".", "")) @@ -73,7 +55,7 @@ resource "proxmox_virtual_environment_vm" "talos-template" { cpu { cores = 2 sockets = 1 - type = "x86-64-v2-AES" + type = "host" } memory { dedicated = 2048 @@ -93,7 +75,4 @@ resource "proxmox_virtual_environment_vm" "talos-template" { datastore_id = local.storagepool version = "v2.0" } - network_device { - bridge = "vmbr1" - } } diff --git a/pve01.wheatley.in/templates/talos/variables.tf b/pve01.wheatley.in/templates/talos/variables.tf index 086f9ff..22784bb 100644 --- a/pve01.wheatley.in/templates/talos/variables.tf +++ b/pve01.wheatley.in/templates/talos/variables.tf @@ -1,8 +1,5 @@ -variable "proxmox_endpoint" { - description = "Proxmox API endpoint" - type = string -} -variable "proxmox_api_token" { - description = "Proxmox API token" - type = string +variable talos_versions { + description = "List of Talos versions to create templates for" + type = list(string) + default = [] } diff --git a/pve01.wheatley.in/templates/variables.tf b/pve01.wheatley.in/templates/variables.tf new file mode 100644 index 0000000..086f9ff --- /dev/null +++ b/pve01.wheatley.in/templates/variables.tf @@ -0,0 +1,8 @@ +variable "proxmox_endpoint" { + description = "Proxmox API endpoint" + type = string +} +variable "proxmox_api_token" { + description = "Proxmox API token" + type = string +} From 814a1cf5e3e0dfe372106d6a37e0624d1d9918c6 Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Sat, 20 Dec 2025 19:36:11 +0100 Subject: [PATCH 06/20] chore: Remove kubelet-serving-cert-approver --- .../talos-bootstrap/templates/machineconfig-cp.yaml.tmpl | 2 -- .../talos-bootstrap/templates/machineconfig-worker.yaml.tmpl | 2 -- 2 files changed, 4 deletions(-) diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl index 67829b1..978019b 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl @@ -16,7 +16,6 @@ machine: kubelet: extraArgs: pod-max-pids: 1000 - rotate-server-certificates: true extraConfig: imageGCHighThresholdPercent: 75 imageGCLowThresholdPercent: 70 @@ -38,7 +37,6 @@ cluster: disabled: true extraManifests: - https://github.com/kubernetes-sigs/gateway-api/releases/download/v${gateway-api_version}/standard-install.yaml - - https://raw.githubusercontent.com/alex1989hu/kubelet-serving-cert-approver/refs/heads/main/deploy/standalone-install.yaml inlineManifests: - name: cilium-bootstrap contents: | diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl index 65e4900..4300403 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl @@ -19,7 +19,6 @@ machine: kubelet: extraArgs: pod-max-pids: 1000 - rotate-server-certificates: true extraConfig: imageGCHighThresholdPercent: 75 imageGCLowThresholdPercent: 70 @@ -51,7 +50,6 @@ cluster: disabled: true extraManifests: - https://github.com/kubernetes-sigs/gateway-api/releases/download/v${gateway-api_version}/standard-install.yaml - - https://raw.githubusercontent.com/alex1989hu/kubelet-serving-cert-approver/refs/heads/main/deploy/standalone-install.yaml inlineManifests: - name: cilium-bootstrap contents: | From 58dce491bb3ddda5cceee76b6b203e2239137c9b Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Sat, 20 Dec 2025 19:36:29 +0100 Subject: [PATCH 07/20] chore: Formatting --- .../k8s-wheatley/modules/talos-node/main.tf | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf index abf0934..deae941 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf @@ -8,20 +8,21 @@ terraform { } resource "proxmox_virtual_environment_vm" "talos-node" { - vm_id = var.node.id - name = var.node.name - node_name = var.node.proxmox_node - tags = ["tofu"] + vm_id = var.node.id + name = var.node.name + node_name = var.node.proxmox_node + tags = ["tofu"] + bios = "ovmf" clone { - vm_id = 10000 + tonumber(replace(var.node.talos_version, ".", "")) + vm_id = 10000 + tonumber(replace(var.node.talos_version, ".", "")) retries = 3 } cpu { cores = var.node.cpu sockets = 1 - type = "x86-64-v2-AES" + type = "host" } memory { @@ -46,17 +47,17 @@ resource "proxmox_virtual_environment_vm" "talos-node" { } network_device { - bridge = "vmbr1" - model = "virtio" - mtu = 1500 + bridge = "vmbr1" + model = "virtio" + mtu = 1500 } dynamic "network_device" { for_each = var.node.type == "worker" ? [1] : [] content { - bridge = "vmbr2" - model = "virtio" - mtu = 9000 + bridge = "vmbr2" + model = "virtio" + mtu = 9000 } } From fbbfee32a4977a7b1a8db4d027633c9e870d352a Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Sat, 3 Jan 2026 13:01:05 +0100 Subject: [PATCH 08/20] chore(templates): Add Talos 1.12 template --- pve01.wheatley.in/templates/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pve01.wheatley.in/templates/main.tf b/pve01.wheatley.in/templates/main.tf index f07e7ab..b616771 100644 --- a/pve01.wheatley.in/templates/main.tf +++ b/pve01.wheatley.in/templates/main.tf @@ -21,5 +21,5 @@ provider "proxmox" { module "talos" { source = "./talos" - talos_versions = ["1.11.5"] + talos_versions = ["1.11.5", "1.12.0"] } From c6d4143df2a734d3adb241be2b6c89b6199e5a14 Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Sat, 3 Jan 2026 13:05:56 +0100 Subject: [PATCH 09/20] feat(k8s-wheatley): Prepare for GPU nodes --- pve01.wheatley.in/k8s-wheatley/main.tf | 5 +++++ .../k8s-wheatley/modules/talos-bootstrap/main.tf | 2 +- .../templates/machineconfig-cp.yaml.tmpl | 1 - .../templates/machineconfig-worker.yaml.tmpl | 7 ++++++- .../k8s-wheatley/modules/talos-bootstrap/variables.tf | 3 ++- .../k8s-wheatley/modules/talos-node/main.tf | 10 ++++++++++ .../k8s-wheatley/modules/talos-node/variables.tf | 1 + 7 files changed, 25 insertions(+), 4 deletions(-) diff --git a/pve01.wheatley.in/k8s-wheatley/main.tf b/pve01.wheatley.in/k8s-wheatley/main.tf index 6e63247..f8e2fe3 100644 --- a/pve01.wheatley.in/k8s-wheatley/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/main.tf @@ -71,16 +71,19 @@ locals { name = "worker01" ip_address = "10.13.37.21" storage_address = "10.0.69.21" + gpu_enabled = false }, { name = "worker02" ip_address = "10.13.37.22" storage_address = "10.0.69.22" + gpu_enabled = false }, { name = "worker03" ip_address = "10.13.37.23" storage_address = "10.0.69.23" + gpu_enabled = false }, ] } @@ -122,6 +125,7 @@ module "workers" { name = format("k8s-wheatley-%s", each.value.name) ipv4_address = each.value.ip_address cpu = local.workers.cpu + gpu = each.value.gpu_enabled memory = local.workers.memory disk = local.workers.disk storagepool = local.workers.storagepool @@ -171,6 +175,7 @@ module "talos-bootstrap" { ipv4_address = node.ip_address storage_address = node.storage_address pvc_disks = local.workers.pvc_disks + gpu_enabled = node.gpu_enabled } ] ) diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf index 117a5ae..55625c7 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf @@ -54,7 +54,6 @@ resource "talos_machine_configuration_apply" "config_apply_cp" { vip_address = var.node_config.cluster_endpoint node_name = format("%s.wheatley.in", var.node_config.proxmox_node) machine_type = each.value.type - talos_version = var.node_config.talos_version gateway-api_version = var.node_config.gateway_api_version cilium_version = var.node_config.cilium_version cilium_install_file = file("${path.module}/templates/cilium-install.yaml.tmpl") @@ -84,6 +83,7 @@ resource "talos_machine_configuration_apply" "config_apply_worker" { cilium_version = var.node_config.cilium_version cilium_install_file = file("${path.module}/templates/cilium-install.yaml.tmpl") pvc_disks = each.value.pvc_disks + gpu_enabled = each.value.gpu_enabled }) ] } diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl index 978019b..53ce1f8 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl @@ -3,7 +3,6 @@ machine: type: ${machine_type} install: disk: /dev/vda - image: factory.talos.dev/nocloud-installer-secureboot/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v${talos_version} network: hostname: ${hostname} nameservers: diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl index 4300403..7692f7d 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl @@ -3,7 +3,9 @@ machine: type: ${machine_type} install: disk: /dev/vda - image: factory.talos.dev/nocloud-installer-secureboot/6adc7e7fba27948460e2231e5272e88b85159da3f3db980551976bf9898ff64b:v${talos_version} +%{ if gpu_enabled != false ~} + image: factory.talos.dev/nocloud-installer-secureboot/29d29d87bf3b88fe13caf73c20c7a8b6a4355d8177d0d690d5c9f85d4ddb67b7:v${talos_version} +%{ endif ~} network: hostname: ${hostname} nameservers: @@ -32,6 +34,9 @@ machine: - usermode_helper=disabled - name: drbd_transport_tcp - name: dm_thin_pool +%{ if gpu_enabled != false ~} + - name: i915 +%{ endif ~} nodeLabels: topology.kubernetes.io/region: ${cluster_name} topology.kubernetes.io/zone: ${node_name} diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf index 9fb3342..095e6c6 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf @@ -21,6 +21,7 @@ variable "talos_nodes" { type = string ipv4_address = string storage_address = optional(string) - pvc_disks = optional(list(number)), + pvc_disks = optional(list(number)) + gpu_enabled = optional(bool, false) })) } diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf index deae941..c312e77 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf @@ -61,6 +61,16 @@ resource "proxmox_virtual_environment_vm" "talos-node" { } } + dynamic "hostpci" { + for_each = var.node.gpu == true ? [1] : [] + content { + device = "hostpci0" + mapping = "A380_GPU" + pcie = true + rombar = true + } + } + initialization { datastore_id = var.node.storagepool ip_config { diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-node/variables.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-node/variables.tf index 84c1013..26b7451 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-node/variables.tf +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-node/variables.tf @@ -7,6 +7,7 @@ variable "node" { ipv4_address = string ipv4_gateway = string cpu = number + gpu = optional(bool, false) memory = number disk = string storagepool = string From 649f1ba59878f2e32dd2e3102a55e45525a0898f Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Mon, 12 Jan 2026 11:49:28 +0100 Subject: [PATCH 10/20] chore(k8s-wheatley): Ensure nodes aren't recreated on template change --- pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf index c312e77..e8a608c 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf @@ -83,4 +83,10 @@ resource "proxmox_virtual_environment_vm" "talos-node" { servers = ["9.9.9.9"] } } + + lifecycle { + ignore_changes = [ + clone, + ] + } } From c8c4c8355bf13d87586fee14684ee1f3a614d5e3 Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:57:01 +0100 Subject: [PATCH 11/20] chore: Move modules to root directory --- .../modules => modules}/talos-bootstrap/main.tf | 0 .../modules => modules}/talos-bootstrap/outputs.tf | 0 .../talos-bootstrap/templates/cilium-install.yaml.tmpl | 0 .../talos-bootstrap/templates/machineconfig-cp.yaml.tmpl | 0 .../templates/machineconfig-worker.yaml.tmpl | 0 .../modules => modules}/talos-bootstrap/variables.tf | 0 .../k8s-wheatley/modules => modules}/talos-node/main.tf | 0 .../modules => modules}/talos-node/variables.tf | 0 pve01.wheatley.in/k8s-wheatley/main.tf | 6 +++--- 9 files changed, 3 insertions(+), 3 deletions(-) rename {pve01.wheatley.in/k8s-wheatley/modules => modules}/talos-bootstrap/main.tf (100%) rename {pve01.wheatley.in/k8s-wheatley/modules => modules}/talos-bootstrap/outputs.tf (100%) rename {pve01.wheatley.in/k8s-wheatley/modules => modules}/talos-bootstrap/templates/cilium-install.yaml.tmpl (100%) rename {pve01.wheatley.in/k8s-wheatley/modules => modules}/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl (100%) rename {pve01.wheatley.in/k8s-wheatley/modules => modules}/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl (100%) rename {pve01.wheatley.in/k8s-wheatley/modules => modules}/talos-bootstrap/variables.tf (100%) rename {pve01.wheatley.in/k8s-wheatley/modules => modules}/talos-node/main.tf (100%) rename {pve01.wheatley.in/k8s-wheatley/modules => modules}/talos-node/variables.tf (100%) diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf b/modules/talos-bootstrap/main.tf similarity index 100% rename from pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf rename to modules/talos-bootstrap/main.tf diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/outputs.tf b/modules/talos-bootstrap/outputs.tf similarity index 100% rename from pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/outputs.tf rename to modules/talos-bootstrap/outputs.tf diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/cilium-install.yaml.tmpl b/modules/talos-bootstrap/templates/cilium-install.yaml.tmpl similarity index 100% rename from pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/cilium-install.yaml.tmpl rename to modules/talos-bootstrap/templates/cilium-install.yaml.tmpl diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl b/modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl similarity index 100% rename from pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl rename to modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl b/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl similarity index 100% rename from pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl rename to modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf b/modules/talos-bootstrap/variables.tf similarity index 100% rename from pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf rename to modules/talos-bootstrap/variables.tf diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf b/modules/talos-node/main.tf similarity index 100% rename from pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf rename to modules/talos-node/main.tf diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-node/variables.tf b/modules/talos-node/variables.tf similarity index 100% rename from pve01.wheatley.in/k8s-wheatley/modules/talos-node/variables.tf rename to modules/talos-node/variables.tf diff --git a/pve01.wheatley.in/k8s-wheatley/main.tf b/pve01.wheatley.in/k8s-wheatley/main.tf index f8e2fe3..bd2d86c 100644 --- a/pve01.wheatley.in/k8s-wheatley/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/main.tf @@ -94,7 +94,7 @@ locals { } module "controlplanes" { - source = "./modules/talos-node" + source = "../../modules/talos-node" for_each = { for node in local.controlplanes.nodes : node.name => node } node = { @@ -116,7 +116,7 @@ module "controlplanes" { } module "workers" { - source = "./modules/talos-node" + source = "../../modules/talos-node" for_each = { for node in local.workers.nodes : node.name => node } node = { @@ -145,7 +145,7 @@ module "talos-bootstrap" { module.workers ] - source = "./modules/talos-bootstrap" + source = "../../modules/talos-bootstrap" node_config = { ipv4_gateway = local.ipv4_gateway From e16de615d008ef614a71b70b62b2481fb5a18cd4 Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:57:16 +0100 Subject: [PATCH 12/20] chore: Add Readme --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 655a5de..845a94e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,47 @@ -# infrastructure +# Hobbyrack Infrastructure +This repository contains the infrastructure-as-code configuration for managing Wheatley, a homelab environment within Hobbyrack. The current focus is on deploying a Kubernetes clusters with Talos and Cilium on Proxmox VE using OpenTofu. + +## Contents + +- **modules/**: Contains reusable modules for cluster bootstrap and node provisioning. + - **talos-bootstrap/**: Bootstraps the Talos cluster, including templates for machine configuration and Cilium installation. + - **talos-node/**: Provisions individual Talos node VMs on Proxmox. +- **pve01.wheatley.in/**: Configuration specific to the Proxmox VE host `pve01.wheatley.in`. + - **k8s-wheatley/**: Provisions the `k8s-wheatley` Kubernetes cluster. + - **templates/**: Provisions VM templates on the PVE host. + +## Requirements + +- [OpenTofu](https://opentofu.org/) >= 1.0 +- Access to a Proxmox VE environment +- (Optional) talosctl for managing Talos nodes + +## Usage + +1. **Initialize OpenTofu** + ```sh + tofu init + ``` +2. **Review the execution plan** + ```sh + tofu plan + ``` +3. **Apply the infrastructure** + ```sh + tofu apply + ``` + +> Adjust variables in `variables.tf` or provide a `terraform.tfvars` file for your environment. + +## Contributing + +Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. + +## License + +This repository is licensed under the MIT License. See the `LICENSE` file for details. + +## Contact + +For questions or support, open an issue or contact via GitHub. From 966894a84aa26764a623efe1ab3f594163e10b95 Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:22:20 +0100 Subject: [PATCH 13/20] chore: Add generated docs --- modules/talos-bootstrap/README.md | 44 +++++++++++++++++++++ modules/talos-node/README.md | 34 ++++++++++++++++ pve01.wheatley.in/k8s-wheatley/README.md | 38 ++++++++++++++++++ pve01.wheatley.in/templates/README.md | 33 ++++++++++++++++ pve01.wheatley.in/templates/talos/README.md | 36 +++++++++++++++++ 5 files changed, 185 insertions(+) create mode 100644 modules/talos-bootstrap/README.md create mode 100644 modules/talos-node/README.md create mode 100644 pve01.wheatley.in/k8s-wheatley/README.md create mode 100644 pve01.wheatley.in/templates/README.md create mode 100644 pve01.wheatley.in/templates/talos/README.md diff --git a/modules/talos-bootstrap/README.md b/modules/talos-bootstrap/README.md new file mode 100644 index 0000000..cb73270 --- /dev/null +++ b/modules/talos-bootstrap/README.md @@ -0,0 +1,44 @@ + +## Requirements + +| Name | Version | +|------|---------| +| [talos](#requirement\_talos) | 0.9.0 | + +## Providers + +| Name | Version | +|------|---------| +| [talos](#provider\_talos) | 0.9.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [talos_cluster_kubeconfig.kubeconfig](https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/cluster_kubeconfig) | resource | +| [talos_machine_bootstrap.talos_machine_bootstrap](https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap) | resource | +| [talos_machine_configuration_apply.config_apply_cp](https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_configuration_apply) | resource | +| [talos_machine_configuration_apply.config_apply_worker](https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_configuration_apply) | resource | +| [talos_machine_secrets.machine_secrets](https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_secrets) | resource | +| [talos_client_configuration.talosconfig](https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/client_configuration) | data source | +| [talos_machine_configuration.machineconfig-cp](https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/machine_configuration) | data source | +| [talos_machine_configuration.machineconfig-worker](https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/machine_configuration) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [node\_config](#input\_node\_config) | Talos node configuration |
object({
ipv4_gateway = string
talos_version = string
gateway_api_version = string
cilium_version = string
cluster_name = string
kubernetes_version = string
cluster_endpoint = string
proxmox_node = string
controlplane_addresses = list(string)
worker_addresses = list(string)
}) | n/a | yes |
+| [talos\_nodes](#input\_talos\_nodes) | List of Talos nodes to bootstrap | list(object({
name = string
type = string
ipv4_address = string
storage_address = optional(string)
pvc_disks = optional(list(number))
gpu_enabled = optional(bool, false)
})) | n/a | yes |
+
+## Outputs
+
+| Name | Description |
+|------|-------------|
+| [kubeconfig](#output\_kubeconfig) | n/a |
+| [talosconfig](#output\_talosconfig) | n/a |
+
\ No newline at end of file
diff --git a/modules/talos-node/README.md b/modules/talos-node/README.md
new file mode 100644
index 0000000..cccf05a
--- /dev/null
+++ b/modules/talos-node/README.md
@@ -0,0 +1,34 @@
+
+## Requirements
+
+| Name | Version |
+|------|---------|
+| [proxmox](#requirement\_proxmox) | 0.86.0 |
+
+## Providers
+
+| Name | Version |
+|------|---------|
+| [proxmox](#provider\_proxmox) | 0.86.0 |
+
+## Modules
+
+No modules.
+
+## Resources
+
+| Name | Type |
+|------|------|
+| [proxmox_virtual_environment_vm.talos-node](https://registry.terraform.io/providers/bpg/proxmox/0.86.0/docs/resources/virtual_environment_vm) | resource |
+
+## Inputs
+
+| Name | Description | Type | Default | Required |
+|------|-------------|------|---------|:--------:|
+| [node](#input\_node) | Basic configuration for the Talos node | object({
id = number
type = string
name = string
ipv4_address = string
ipv4_gateway = string
cpu = number
gpu = optional(bool, false)
memory = number
disk = string
storagepool = string
talos_version = string
cluster_name = string
kubernetes_version = string
cluster_endpoint = string
proxmox_node = string
}) | n/a | yes |
+| [pvc\_disks](#input\_pvc\_disks) | List of extra disks to attach to the node | `list(number)` | `[]` | no |
+
+## Outputs
+
+No outputs.
+
\ No newline at end of file
diff --git a/pve01.wheatley.in/k8s-wheatley/README.md b/pve01.wheatley.in/k8s-wheatley/README.md
new file mode 100644
index 0000000..0f8b055
--- /dev/null
+++ b/pve01.wheatley.in/k8s-wheatley/README.md
@@ -0,0 +1,38 @@
+
+## Requirements
+
+| Name | Version |
+|------|---------|
+| [proxmox](#requirement\_proxmox) | 0.86.0 |
+| [talos](#requirement\_talos) | 0.9.0 |
+
+## Providers
+
+No providers.
+
+## Modules
+
+| Name | Source | Version |
+|------|--------|---------|
+| [controlplanes](#module\_controlplanes) | ../../modules/talos-node | n/a |
+| [talos-bootstrap](#module\_talos-bootstrap) | ../../modules/talos-bootstrap | n/a |
+| [workers](#module\_workers) | ../../modules/talos-node | n/a |
+
+## Resources
+
+No resources.
+
+## Inputs
+
+| Name | Description | Type | Default | Required |
+|------|-------------|------|---------|:--------:|
+| [proxmox\_api\_token](#input\_proxmox\_api\_token) | Proxmox API token | `string` | n/a | yes |
+| [proxmox\_endpoint](#input\_proxmox\_endpoint) | Proxmox API endpoint | `string` | n/a | yes |
+
+## Outputs
+
+| Name | Description |
+|------|-------------|
+| [kubeconfig](#output\_kubeconfig) | n/a |
+| [talosconfig](#output\_talosconfig) | n/a |
+
\ No newline at end of file
diff --git a/pve01.wheatley.in/templates/README.md b/pve01.wheatley.in/templates/README.md
new file mode 100644
index 0000000..bdbca5d
--- /dev/null
+++ b/pve01.wheatley.in/templates/README.md
@@ -0,0 +1,33 @@
+
+## Requirements
+
+| Name | Version |
+|------|---------|
+| [http](#requirement\_http) | 3.5.0 |
+| [proxmox](#requirement\_proxmox) | 0.86.0 |
+
+## Providers
+
+No providers.
+
+## Modules
+
+| Name | Source | Version |
+|------|--------|---------|
+| [talos](#module\_talos) | ./talos | n/a |
+
+## Resources
+
+No resources.
+
+## Inputs
+
+| Name | Description | Type | Default | Required |
+|------|-------------|------|---------|:--------:|
+| [proxmox\_api\_token](#input\_proxmox\_api\_token) | Proxmox API token | `string` | n/a | yes |
+| [proxmox\_endpoint](#input\_proxmox\_endpoint) | Proxmox API endpoint | `string` | n/a | yes |
+
+## Outputs
+
+No outputs.
+
\ No newline at end of file
diff --git a/pve01.wheatley.in/templates/talos/README.md b/pve01.wheatley.in/templates/talos/README.md
new file mode 100644
index 0000000..eff4004
--- /dev/null
+++ b/pve01.wheatley.in/templates/talos/README.md
@@ -0,0 +1,36 @@
+
+## Requirements
+
+| Name | Version |
+|------|---------|
+| [proxmox](#requirement\_proxmox) | 0.86.0 |
+
+## Providers
+
+| Name | Version |
+|------|---------|
+| [http](#provider\_http) | n/a |
+| [proxmox](#provider\_proxmox) | 0.86.0 |
+
+## Modules
+
+No modules.
+
+## Resources
+
+| Name | Type |
+|------|------|
+| [proxmox_virtual_environment_download_file.talos-image](https://registry.terraform.io/providers/bpg/proxmox/0.86.0/docs/resources/virtual_environment_download_file) | resource |
+| [proxmox_virtual_environment_vm.talos-template](https://registry.terraform.io/providers/bpg/proxmox/0.86.0/docs/resources/virtual_environment_vm) | resource |
+| [http_http.schematic](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |
+
+## Inputs
+
+| Name | Description | Type | Default | Required |
+|------|-------------|------|---------|:--------:|
+| [talos\_versions](#input\_talos\_versions) | List of Talos versions to create templates for | `list(string)` | `[]` | no |
+
+## Outputs
+
+No outputs.
+
\ No newline at end of file
From a5813d7decab88ca9604f6e45c6e398c7eaeeb8d Mon Sep 17 00:00:00 2001
From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com>
Date: Mon, 2 Feb 2026 14:13:04 +0100
Subject: [PATCH 14/20] feat: Add network readme
---
NETWORK.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
create mode 100644 NETWORK.md
diff --git a/NETWORK.md b/NETWORK.md
new file mode 100644
index 0000000..c99587c
--- /dev/null
+++ b/NETWORK.md
@@ -0,0 +1,65 @@
+# Infrastructure Overview – Wheatley
+
+This document describes the network and infrastructure architecture of the *Wheatley* environment. Its purpose is to clearly document **connectivity, routing, and responsibilities per site**, enabling predictable operations, troubleshooting, and future expansion.
+
+---
+
+## Overview
+
+The infrastructure consists of three primary sites:
+
+| Site | Role | Subnet |
+|------|------|--------|
+| **Hobbyrack** | Central hub, homelab, workloads | `10.13.37.0/24` |
+| **MAPPS** | Externally managed platform services | `10.7.65.192/26` |
+| **Home** | Client network | `192.168.1.0/24` |
+
+Connectivity between sites is provided via **IPSec** and **WireGuard**, with *Hobbyrack* acting as the central routing and transit hub.
+
+---
+
+## Network Diagram
+
+```mermaid
+flowchart LR
+ %% Hobbyrack
+ subgraph HR["Hobbyrack"]
+ HR_OPN["OPNsense Gateway
+10.13.37.1"]
+ HR_LAN["10.13.37.0/24"]
+ HR_CLUSTER["k8s-wheatley
+(Servarr stack)"]
+ HR_OPN --- HR_LAN
+ HR_LAN --- HR_CLUSTER
+ end
+
+ %% Managed Apps
+ subgraph MA["Forti – Managed"]
+ MA_GW["Gateway
+10.7.65.193"]
+ MA_LAN["10.7.65.192/26"]
+ MA_CLUSTER["MAPPS Cluster
+(Mimir, Loki, Vault)"]
+ MA_CLUSTER2["k8s-peterg
+(ArgoCD)"]
+ MA_GW --- MA_LAN
+ MA_LAN --- MA_CLUSTER
+ MA_LAN --- MA_CLUSTER2
+ end
+
+ %% Home
+ subgraph TH["Home"]
+ TH_GW["UniFi Gateway
+192.168.1.1"]
+ TH_LAN["192.168.1.0/24"]
+ TH_CLIENTS["Clients"]
+ TH_GW --- TH_LAN
+ TH_LAN --- TH_CLIENTS
+ end
+
+ %% Tunnels
+ HR_OPN <==>|"IPSec
+10.13.37.0/24 ↔ 10.7.65.192/26"| MA_GW
+ HR_OPN <==>|"WireGuard Hub
+10.167.84.0/24"| TH_GW
+
From 02166537bf2a5d537001f8845de0f15721803d90 Mon Sep 17 00:00:00 2001
From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com>
Date: Thu, 5 Feb 2026 22:25:40 +0100
Subject: [PATCH 15/20] chore: Bump talos template version
---
pve01.wheatley.in/templates/main.tf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pve01.wheatley.in/templates/main.tf b/pve01.wheatley.in/templates/main.tf
index b616771..eb46ee2 100644
--- a/pve01.wheatley.in/templates/main.tf
+++ b/pve01.wheatley.in/templates/main.tf
@@ -21,5 +21,5 @@ provider "proxmox" {
module "talos" {
source = "./talos"
- talos_versions = ["1.11.5", "1.12.0"]
+ talos_versions = ["1.12.2"]
}
From 2b689f10416d1591a5a72ef76c3f770a22498dc7 Mon Sep 17 00:00:00 2001
From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com>
Date: Fri, 6 Feb 2026 11:06:36 +0100
Subject: [PATCH 16/20] chore: Add renovate
---
renovate.json | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 renovate.json
diff --git a/renovate.json b/renovate.json
new file mode 100644
index 0000000..d2cdd71
--- /dev/null
+++ b/renovate.json
@@ -0,0 +1,15 @@
+{
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
+ "extends": [
+ "config:best-practices"
+ ],
+ "dependencyDashboard": true,
+ "dependencyDashboardTitle": "Renovate Dashboard",
+ "labels": [
+ "renovate"
+ ],
+ "prHourlyLimit": 0,
+ "schedule": [
+ "before 6am on Tuesday"
+ ]
+}
From 416bdd485f6145dada3ddf670f6453295d24999b Mon Sep 17 00:00:00 2001
From: Renovate