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