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] 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