Files
homelab/k8s/infra/longhorn/longhorn-nodes.yaml
T
rock 3462096311 fix(longhorn): isolate GPU worker from general storage scheduling
- Remove expand-replicas-job (blindly forced all volumes to 3 replicas,
  ignoring StorageClass settings)
- Add diskSelector: 'storage' to longhorn and longhorn-cnpg StorageClasses
  so replicas only land on CP nodes (cp-1, cp-2, cp-3)
- Tag all CP node disks with 'storage' via PostSync job
  (disk names are runtime-discovered, can't hardcode in Node CRs)
- Disable scheduling on worker-1 Node CR — only longhorn-llm-local
  (diskSelector: 'llm') can use it
- worker-1 is GPU-only: llm-models and comfyui use dedicated SCs
2026-09-11 09:33:52 +09:00

42 lines
1.1 KiB
YAML

# Longhorn Node CRDs for cp-2, cp-3, and worker-1.
# cp-2/cp-3 have the control-plane taint, so Longhorn doesn't auto-discover them.
# Explicit Node CRDs + the taint-toleration setting enable storage across all 3 CP nodes.
#
# `spec.disks` is deliberately absent for CP nodes. Longhorn owns disk identity:
# it names the entry itself and writes `storageReserved`, `diskType` and
# `evictionRequested` into it. Disk tags are applied via kubectl patch (see
# longhorn-tag-disks-job.yaml) since disk names are runtime-discovered.
#
# worker-1 has scheduling disabled so only StorageClasses with explicit
# diskSelector (e.g. `llm` for longhorn-llm-local) can use it.
---
apiVersion: longhorn.io/v1beta2
kind: Node
metadata:
name: talos-cp-2
namespace: longhorn-system
spec:
name: talos-cp-2
allowScheduling: true
tags: []
---
apiVersion: longhorn.io/v1beta2
kind: Node
metadata:
name: talos-cp-3
namespace: longhorn-system
spec:
name: talos-cp-3
allowScheduling: true
tags: []
---
apiVersion: longhorn.io/v1beta2
kind: Node
metadata:
name: worker-1
namespace: longhorn-system
spec:
name: worker-1
allowScheduling: false
tags: []