Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to these modules are listed here. Versions are git tags; pin module sources with `?ref=<tag>`.

## Unreleased

Changes to the hardware of the `talos` VMs. Each needs a restart of each VM, and the provider restarts every VM it changes: a plain apply restarts every node of a pool at once. Make the changes in Proxmox one node at a time first, or apply one VM at a time: see [UPGRADING.md](./UPGRADING.md#to-the-next-version-vm-hardware). Not applied to a running cluster.

### Fixed

- `talos`: the VMs get a balloon device, with `floating` equal to `dedicated` so no memory is ballooned away. Without one, Proxmox cannot read the guest's memory statistics and shows the memory the guest has touched, page cache included, as used: close to 100% on every Talos node.
- `talos`: the VMs get a standard display (`vga` type `std`) and a serial port. The display came from the template, and one with `vga: serial0` gives the VMs no screen: the Talos dashboard, which is drawn on the screen, is never seen. The serial port keeps what Talos writes to `ttyS0` in the xterm.js console.
- `talos`: the disk has `discard = "on"` and `ssd = true`. A disk block on a clone takes the provider's defaults, `discard = "ignore"`, so space freed in the guest was never freed in Ceph.

## v0.8.0 - 2026-11-18

`talos` turns kube-proxy off again. Since v0.3.0 the module deleted the `KubeProxyConfig` document, and without it Talos 1.14 falls back to v1alpha1's `cluster.proxy`, which the module does not set, and runs kube-proxy: every cluster built on or moved to v0.3.0 or later runs kube-proxy next to the CNI. The other modules are unchanged.
Expand Down
24 changes: 24 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Upgrading

## To the next version: VM hardware

Every Talos VM gets a balloon device (`floating` equal to `dedicated`), a standard display, a serial port, and `discard` and SSD emulation on its disk. All of them need a restart of the VM, and the provider restarts each VM it changes: a plain apply restarts every node of a pool at once, which takes etcd below quorum on the control planes.

To choose when each node restarts, make the change in Proxmox first, one node at a time, and apply afterwards. The apply then has nothing to change on the VMs.

1. Check that etcd is healthy and has all members: `talosctl -n <node> etcd status`. Drain a worker first: `kubectl drain <node> --ignore-daemonsets --delete-emptydir-data`.
2. On a Proxmox host, set the same values the module sets, then restart the VM through Proxmox. A reboot from inside the guest (`talosctl reboot`) keeps the QEMU process and does not apply the change.

```sh
qm config <vmid> | grep ^scsi0 # the disk's options now
qm set <vmid> --memory <memory> --balloon <memory> --vga std --serial0 socket
qm set <vmid> --scsi0 <the scsi0 line, with discard=on,ssd=1>
qm reboot <vmid> # applies pending changes
qm pending <vmid> # nothing pending afterwards
```

`--scsi0` replaces every option of the disk: copy the line from `qm config` and change only `discard` and `ssd`.

3. Wait for the node to be `Ready` and etcd to list it again, `kubectl uncordon` a worker, then do the next node.
4. Plan: the VMs show no change. Apply.

Or apply with `-target` on one VM at a time: `-target='module.<pool>.proxmox_virtual_environment_vm.this["<key>"]'`.

## To v0.8.0

v0.8.0 turns kube-proxy off on a cluster that runs it since v0.3.0. Talos stops applying its manifest, but never deletes what it applied. Do one cluster at a time.
Expand Down
17 changes: 17 additions & 0 deletions talos/proxmox.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ resource "proxmox_virtual_environment_vm" "this" {
type = var.cpu_type
}

# floating = dedicated turns the balloon device on without ballooning any memory away.
# Without it (floating = 0) Proxmox cannot read the guest's memory statistics and shows
# every page the guest has touched, page cache included, as used: close to 100%
memory {
dedicated = var.memory
floating = var.memory
}

agent {
Expand All @@ -69,6 +73,10 @@ resource "proxmox_virtual_environment_vm" "this" {
interface = "scsi0"
size = var.disk
iothread = true
# Space freed in the guest is freed in Ceph too. Set here because a disk block on a clone
# takes the provider's defaults (discard = "ignore", ssd = false), not the template's
discard = "on"
ssd = true
}

initialization {
Expand All @@ -91,6 +99,15 @@ resource "proxmox_virtual_environment_vm" "this" {
}
}

# The Talos dashboard is drawn on the screen, so the VM needs a display. Not left to the
# template: one with vga = serial0 gives the VM none, and the dashboard is never seen
vga {
type = "std"
}

# Talos writes its own output to ttyS0 (the last console= of the image): xterm.js in Proxmox
serial_device {}

network_device {
bridge = var.vm_bridge
vlan_id = var.node_vlan_vid
Expand Down
5 changes: 5 additions & 0 deletions talos/tests/nodes.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ run "defaults" {
proxmox_virtual_environment_vm.this["a"].clone[0].vm_id == 9201,
proxmox_virtual_environment_vm.this["a"].clone[0].node_name == "pve1",
proxmox_virtual_environment_vm.this["a"].on_boot == false,
proxmox_virtual_environment_vm.this["a"].memory[0].floating == proxmox_virtual_environment_vm.this["a"].memory[0].dedicated,
proxmox_virtual_environment_vm.this["a"].vga[0].type == "std",
length(proxmox_virtual_environment_vm.this["a"].serial_device) == 1,
proxmox_virtual_environment_vm.this["a"].disk[0].discard == "on",
proxmox_virtual_environment_vm.this["a"].disk[0].ssd == true,
proxmox_virtual_environment_vm.this["a"].agent[0].enabled == true,
proxmox_virtual_environment_vm.this["a"].tags == tolist(["kubernetes", "terraform"]),
proxmox_virtual_environment_vm.this["a"].description == "Talos worker node of Kubernetes cluster test. Managed by OpenTofu: changes made here are overwritten.",
Expand Down
Loading