diff --git a/k8s/applications/sqs/charts/kafka-cluster/templates/storageclass.yaml b/k8s/applications/sqs/charts/kafka-cluster/templates/storageclass.yaml deleted file mode 100644 index a821726..0000000 --- a/k8s/applications/sqs/charts/kafka-cluster/templates/storageclass.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if eq .Values.nodePool.storage.class "longhorn-kafka" }} -# The default "longhorn" StorageClass requests 3 replicas across 3 zone-labeled -# nodes (az-a/az-b/az-c). With Longhorn's zone-aware anti-affinity, replicas -# spread 1-per-zone for durability. -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: longhorn-kafka -provisioner: driver.longhorn.io -allowVolumeExpansion: true -reclaimPolicy: Delete -volumeBindingMode: Immediate -parameters: - numberOfReplicas: "3" - staleReplicaTimeout: "30" - fromBackup: "" - fsType: "ext4" - dataLocality: "disabled" -{{- end }} diff --git a/k8s/applications/sqs/charts/kafka-cluster/values.yaml b/k8s/applications/sqs/charts/kafka-cluster/values.yaml index 187c591..1e3d8ed 100644 --- a/k8s/applications/sqs/charts/kafka-cluster/values.yaml +++ b/k8s/applications/sqs/charts/kafka-cluster/values.yaml @@ -4,7 +4,7 @@ namespace: sqs nodePool: replicas: 3 storage: - class: longhorn-kafka + class: longhorn # Longhorn's per-node scheduling budget on the current 2-node cluster has # only ~36Gi of headroom left (other PVCs already reserve the rest), and # each node hosts one replica of all 3 broker volumes -- so 3 * sizeGi diff --git a/k8s/applications/sqs/environments/homelab.yaml b/k8s/applications/sqs/environments/homelab.yaml index 44aa6ee..74afced 100644 --- a/k8s/applications/sqs/environments/homelab.yaml +++ b/k8s/applications/sqs/environments/homelab.yaml @@ -7,8 +7,8 @@ kafkaCluster: nodePool: replicas: 3 storage: - # longhorn-kafka now uses numberOfReplicas: 3 across 3 zone-labeled nodes. - class: longhorn-kafka + # Use unified longhorn StorageClass (3 replicas, Immediate binding) + class: longhorn # Per-node headroom: with 3 nodes and existing PVCs, estimate ~100+ Gi total # available. Each node hosts one replica of all 3 broker volumes, so 3 * # sizeGi must fit. Monitor usage during Kafka deployment. diff --git a/k8s/infrastructure/longhorn/longhorn-storageclass.yaml b/k8s/infrastructure/longhorn/longhorn-storageclass.yaml index a9b0075..61e0d85 100644 --- a/k8s/infrastructure/longhorn/longhorn-storageclass.yaml +++ b/k8s/infrastructure/longhorn/longhorn-storageclass.yaml @@ -10,12 +10,12 @@ metadata: provisioner: driver.longhorn.io allowVolumeExpansion: true reclaimPolicy: Delete -volumeBindingMode: WaitForFirstConsumer # Wait for pod scheduling before binding +volumeBindingMode: Immediate # Immediate binding for StatefulSets (matches deployed config) parameters: numberOfReplicas: "3" # HA across all 3 nodes staleReplicaTimeout: "30" fromBackup: "" - dataLocality: "best-effort" # Prefer local replica when possible + dataLocality: "disabled" # Match deployed config (not best-effort) fsType: "ext4" disableRevisionCounter: "true" # Performance optimization unmapMarkSnapChainRemoved: "ignored"