2026-09-02 22:50:34 +01:00
|
|
|
# Prepares each dedicated worker for Longhorn (apps/longhorn.yaml) — the
|
|
|
|
|
# storage layer this repo ships pre-installed. Applied to worker.yaml only;
|
|
|
|
|
# the three Raspberry Pi control-plane nodes do not provide application
|
|
|
|
|
# storage.
|
2026-08-22 18:25:38 +01:00
|
|
|
#
|
|
|
|
|
# This file has TWO documents (separated by `---`), because it's making two
|
|
|
|
|
# different kinds of change: a patch to the normal machine config, and a
|
|
|
|
|
# standalone Talos resource that doesn't live inside `machine:`/`cluster:`
|
|
|
|
|
# at all.
|
|
|
|
|
#
|
|
|
|
|
# --- Document 1: mount the volume into the kubelet's view ---
|
|
|
|
|
# Talos runs the kubelet in its own isolated mount namespace. Without this,
|
|
|
|
|
# a volume mounted at /var/mnt/longhorn on the node itself would be
|
|
|
|
|
# invisible to any Pod using a hostPath-style mount there — which is
|
|
|
|
|
# exactly how Longhorn's own manager and engine Pods access node storage.
|
|
|
|
|
# This bind-mounts that same path into the kubelet's namespace so Pods can
|
|
|
|
|
# actually see it. `rshared` matters specifically: it lets mounts Longhorn
|
|
|
|
|
# creates later *underneath* this path (one per volume) propagate back out
|
|
|
|
|
# to the host, instead of being invisible outside the container that made
|
|
|
|
|
# them.
|
|
|
|
|
#
|
|
|
|
|
# --- Document 2: UserVolumeConfig ---
|
|
|
|
|
# A Talos UserVolumeConfig tells Talos itself to find, format, and mount a
|
|
|
|
|
# disk — no manual partitioning on your part. `diskSelector.match:
|
|
|
|
|
# '!system_disk'` means "any disk that isn't the one Talos is installed
|
2026-09-02 22:50:34 +01:00
|
|
|
# on" (never touches your OS disk), and `minSize: 300GiB` means "only
|
|
|
|
|
# consider disks at least that large." Each worker has one 350GiB data disk
|
|
|
|
|
# and one 20GiB system disk, so this admits the intended data disk while
|
|
|
|
|
# rejecting the boot disk.
|
2026-08-22 18:25:38 +01:00
|
|
|
# `grow: false` keeps the volume at its initial size even if the
|
|
|
|
|
# underlying disk is later resized — deliberate here, so growing storage
|
|
|
|
|
# is always a conscious decision (see docs/09-growing-up.md).
|
|
|
|
|
#
|
|
|
|
|
# The `name: longhorn` below is what determines the mount path Talos uses
|
|
|
|
|
# — user volumes are always mounted at /var/mnt/<name>, which is why
|
|
|
|
|
# Document 1 above and apps/longhorn/values.yaml both hardcode
|
|
|
|
|
# /var/mnt/longhorn. Renaming this would mean updating both.
|
|
|
|
|
#
|
|
|
|
|
# >> Ask Claude: "how do I find out which of my disks Talos will actually
|
|
|
|
|
# pick for this?" before you boot for real — worth confirming on your
|
|
|
|
|
# specific hardware rather than assuming.
|
|
|
|
|
machine:
|
|
|
|
|
kubelet:
|
|
|
|
|
extraMounts:
|
|
|
|
|
- destination: /var/mnt/longhorn
|
|
|
|
|
type: bind
|
|
|
|
|
source: /var/mnt/longhorn
|
|
|
|
|
options:
|
|
|
|
|
- bind
|
|
|
|
|
- rshared
|
|
|
|
|
- rw
|
|
|
|
|
---
|
|
|
|
|
apiVersion: v1alpha1
|
|
|
|
|
kind: UserVolumeConfig
|
|
|
|
|
name: longhorn
|
|
|
|
|
provisioning:
|
|
|
|
|
diskSelector:
|
|
|
|
|
match: "!system_disk"
|
2026-09-02 22:50:34 +01:00
|
|
|
minSize: 300GiB
|
2026-08-22 18:25:38 +01:00
|
|
|
grow: false
|