From a8d26a946fa6d2ac8f8eb6fefc7eac400bc260c4 Mon Sep 17 00:00:00 2001 From: ahmza Date: Thu, 3 Sep 2026 03:33:14 +0100 Subject: [PATCH] Fix Longhorn default StorageClass to actually use 2 replicas --- apps/longhorn/values.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/longhorn/values.yaml b/apps/longhorn/values.yaml index 47fba81..faa7f8d 100644 --- a/apps/longhorn/values.yaml +++ b/apps/longhorn/values.yaml @@ -14,8 +14,17 @@ longhorn: createDefaultDiskLabeledNodes: true # There are two independent storage workers, one on Gimli and one on # Titus. Three replicas could never schedule; two keeps one complete copy - # on each host and remains readable if either worker fails. + # on each host and remains readable if either worker fails. This setting + # only affects volumes created through Longhorn's own UI—Kubernetes PVCs + # actually read numberOfReplicas from the StorageClass below instead, so + # both must be kept in sync. defaultReplicaCount: 2 + # The default StorageClass Longhorn's chart creates reads numberOfReplicas + # from here, not from defaultSettings above. Every PVC that doesn't name a + # storageClassName goes through this class, so this is the value that + # actually governs replica count for real workloads. + persistence: + defaultClassReplicaCount: 2 # Longhorn's own headroom settings, kept conservative: stop scheduling # new replicas onto a disk once free space drops below these # thresholds, so the cluster degrades gracefully instead of actually