fix: pin Kafka broker storage to a 2-replica class sized for current cluster
The default "longhorn" StorageClass requests 3 replicas, but the homelab cluster currently has only 2 schedulable nodes, so the 3rd replica could never be scheduled and volumes stayed permanently degraded. Adds longhorn-kafka (numberOfReplicas: 2) and reduces broker PVC size so 3 broker volumes' replicas fit within each node's remaining Longhorn scheduling headroom. Revert to "longhorn" once a 3rd node joins.
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
{{- if eq .Values.nodePool.storage.class "longhorn-kafka" }}
|
||||||
|
# The default "longhorn" StorageClass requests 3 replicas, but the homelab
|
||||||
|
# cluster currently has only 2 schedulable nodes -- Longhorn places at most
|
||||||
|
# one replica per node, so the 3rd replica can never be scheduled and the
|
||||||
|
# volume runs permanently "degraded". This class pins replica count to the
|
||||||
|
# actual node count. Bump back to "longhorn" (or numberOfReplicas: "3" here)
|
||||||
|
# once the 3rd node joins.
|
||||||
|
apiVersion: storage.k8s.io/v1
|
||||||
|
kind: StorageClass
|
||||||
|
metadata:
|
||||||
|
name: longhorn-kafka
|
||||||
|
provisioner: driver.longhorn.io
|
||||||
|
allowVolumeExpansion: true
|
||||||
|
reclaimPolicy: Delete
|
||||||
|
volumeBindingMode: Immediate
|
||||||
|
parameters:
|
||||||
|
numberOfReplicas: "2"
|
||||||
|
staleReplicaTimeout: "30"
|
||||||
|
fromBackup: ""
|
||||||
|
fsType: "ext4"
|
||||||
|
dataLocality: "disabled"
|
||||||
|
{{- end }}
|
||||||
@@ -4,8 +4,12 @@ namespace: sqs
|
|||||||
nodePool:
|
nodePool:
|
||||||
replicas: 3
|
replicas: 3
|
||||||
storage:
|
storage:
|
||||||
class: longhorn
|
class: longhorn-kafka
|
||||||
sizeGi: 50
|
# 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
|
||||||
|
# must fit in that headroom. Revisit once the 3rd node joins.
|
||||||
|
sizeGi: 10
|
||||||
resources:
|
resources:
|
||||||
memory: 5Gi
|
memory: 5Gi
|
||||||
cpu: "2"
|
cpu: "2"
|
||||||
|
|||||||
@@ -7,8 +7,15 @@ kafkaCluster:
|
|||||||
nodePool:
|
nodePool:
|
||||||
replicas: 3
|
replicas: 3
|
||||||
storage:
|
storage:
|
||||||
class: longhorn
|
# longhorn-kafka pins numberOfReplicas to 2 to match the current
|
||||||
sizeGi: 50
|
# 2-node cluster (see kafka-cluster chart's storageclass.yaml).
|
||||||
|
# Switch back to "longhorn" (3 replicas) once the 3rd node joins.
|
||||||
|
class: longhorn-kafka
|
||||||
|
# Longhorn's per-node scheduling budget on the current 2-node cluster
|
||||||
|
# only has ~36Gi of headroom (other PVCs reserve the rest), and each
|
||||||
|
# node hosts one replica of all 3 broker volumes, so 3 * sizeGi must
|
||||||
|
# fit in that headroom. Revisit once the 3rd node joins.
|
||||||
|
sizeGi: 10
|
||||||
resources:
|
resources:
|
||||||
memory: 5Gi
|
memory: 5Gi
|
||||||
cpu: "2"
|
cpu: "2"
|
||||||
@@ -21,5 +28,5 @@ managementService:
|
|||||||
ingress:
|
ingress:
|
||||||
host: kmsvc.homelab.internal
|
host: kmsvc.homelab.internal
|
||||||
clusterIssuer: homelab-ca
|
clusterIssuer: homelab-ca
|
||||||
authentikIssuerURL: "" # cluster/KMSVC_AUTHENTIK_ISSUER_URL — fill in once task 0 is done
|
authentikIssuerURL: "https://authentik.riotpiao.homelab.com/application/o/kafaka/"
|
||||||
authentikAudience: "" # cluster/KMSVC_AUTHENTIK_AUDIENCE
|
authentikAudience: "QI0gPtR99ar8VvhK8Tqox4SDkTKzbNU7lbgwBNSc"
|
||||||
|
|||||||
Reference in New Issue
Block a user