2026-07-20 23:49:01 -07:00
|
|
|
# longhorn-wffc — Longhorn StorageClass with WaitForFirstConsumer binding.
|
|
|
|
|
#
|
2026-07-22 08:46:57 -07:00
|
|
|
# WaitForFirstConsumer defers PV binding until the pod is scheduled, ensuring the
|
|
|
|
|
# volume is provisioned on a node where the pod can actually run. Critical for HA:
|
|
|
|
|
# with 3-replica volumes spread across 3 nodes, the scheduler needs to see which
|
|
|
|
|
# nodes already have replicas before placing the pod, avoiding situations where
|
|
|
|
|
# the pod lands on a node that can't reach any replica.
|
2026-07-20 23:49:01 -07:00
|
|
|
#
|
2026-07-22 08:46:57 -07:00
|
|
|
# numberOfReplicas=3 provides true HA: each volume has 3 copies across 3 nodes.
|
|
|
|
|
# If one node fails, the remaining 2 nodes still have the data and can serve it.
|
|
|
|
|
# volumeBindingMode is immutable, so this is a distinct SC from the chart's default.
|
2026-07-20 23:49:01 -07:00
|
|
|
apiVersion: storage.k8s.io/v1
|
|
|
|
|
kind: StorageClass
|
|
|
|
|
metadata:
|
|
|
|
|
name: longhorn-wffc
|
|
|
|
|
annotations:
|
|
|
|
|
storageclass.kubernetes.io/is-default-class: "true"
|
|
|
|
|
provisioner: driver.longhorn.io
|
|
|
|
|
allowVolumeExpansion: true
|
|
|
|
|
reclaimPolicy: Delete
|
|
|
|
|
volumeBindingMode: WaitForFirstConsumer
|
|
|
|
|
parameters:
|
2026-07-22 08:46:57 -07:00
|
|
|
numberOfReplicas: "3"
|
2026-07-20 23:49:01 -07:00
|
|
|
staleReplicaTimeout: "30"
|
|
|
|
|
fromBackup: ""
|
|
|
|
|
dataLocality: "best-effort"
|