fix(longhorn): clear permanent OutOfSync on longhorn-config

StorageClass.parameters is immutable and mkfsParams was added after creation,
so every sync failed. Replace=true recreates it instead of patching. Existing
volumes keep their format; only new ones get mkfsParams.

Longhorn names its own disk key and writes storageReserved into it, so git's
default-disk never matched and selfHeal kept trying to add a second disk on the
same path. Dropped spec.disks from git, added ignoreDifferences.
This commit is contained in:
Story Crater Bot
2026-08-15 23:07:49 -07:00
parent a005a07648
commit 9b75b15aa3
3 changed files with 34 additions and 12 deletions
+10 -12
View File
@@ -1,6 +1,16 @@
# Longhorn Node CRDs for cp-2 and cp-3.
# These nodes have the control-plane taint, so Longhorn doesn't auto-discover them.
# Explicit Node CRDs + the taint-toleration setting enable storage across all 3 nodes.
#
# `spec.disks` is deliberately absent. Longhorn owns disk identity: it names the
# entry itself (`default-disk-080400000000`, not `default-disk`) and writes
# `storageReserved`, `diskType` and `evictionRequested` into it. Declaring a
# `default-disk` key here never matched the live one, so the Application sat
# OutOfSync and selfHeal kept trying to add a SECOND disk record pointing at the
# same /var/lib/longhorn path — which is worse than the drift it was fixing.
#
# What these objects are actually for is `allowScheduling: true` on tainted
# control-plane nodes. That is all they need to declare.
---
apiVersion: longhorn.io/v1beta2
kind: Node
@@ -10,12 +20,6 @@ metadata:
spec:
name: talos-cp-2
allowScheduling: true
disks:
default-disk:
allowScheduling: true
path: /var/lib/longhorn
storageReserved: 0
tags: []
tags: []
---
apiVersion: longhorn.io/v1beta2
@@ -26,10 +30,4 @@ metadata:
spec:
name: talos-cp-3
allowScheduling: true
disks:
default-disk:
allowScheduling: true
path: /var/lib/longhorn
storageReserved: 0
tags: []
tags: []