feat: Initial k8s cluster setup

This commit is contained in:
Peter 2025-10-24 23:41:05 +02:00
parent dc71408e1b
commit 5def74736b
Signed by: Peter
SSH key fingerprint: SHA256:B5tYaxBExaDm74r1px9iVeZ6F/ZDiyiy9SbBqfZYrvg
6 changed files with 233 additions and 0 deletions

View file

@ -0,0 +1,44 @@
terraform {
required_providers {
proxmox = {
source = "telmate/proxmox"
version = ">= 3.0.2-rc05"
}
}
}
resource "proxmox_vm_qemu" "controlplane" {
for_each = { for node in var.controlplanes.nodes : node.name => node }
name = format("k8s-wheatley-%s", each.value.name)
target_node = "pve01"
tags = "k8s-wheatley,controlplane"
onboot = true
bios = "ovmf"
boot = "order=virtio0;net0"
clone = format("talos-%s", var.controlplanes.talos_version)
scsihw = "virtio-scsi-pci"
disk {
size = var.controlplanes.disk
storage = var.controlplanes.storagepool
type = "disk"
slot = "virtio0"
format = "raw"
}
cpu {
cores = var.controlplanes.cpu
sockets = 1
}
memory = var.controlplanes.memory * 1024
network {
id = 0
model = "virtio"
bridge = "vmbr1"
}
ipconfig0 = format("ip=%s/24,gw=10.13.38.1", each.value.ip_address)
skip_ipv6 = true
}