add longhorn

This commit is contained in:
2026-07-08 15:48:18 +07:00
parent 0052e152f2
commit 7d18a1c6ce
3 changed files with 305 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: infra-longhorn
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "-10" # nền cụm -> sync sớm nhất trong tầng infra
spec:
project: default
source:
repoURL: https://charts.longhorn.io
chart: longhorn
targetRevision: 1.11.3 # pin: Longhorn v1.11.3 (2026-07-01), dòng 1.11 đã chín
helm:
releaseName: longhorn
values: |
persistence:
# KHÔNG để longhorn làm default StorageClass — giữ local-path là default của cụm.
# Workload lakehouse xin tường minh storageClassName: longhorn (checkpoint, kafka PV).
defaultClass: false
# 3 bản sao, trải trên 3/5 VM (hard anti-affinity mặc định).
# Chống 1-2 VM/pod chết. KHÔNG chống host Proxmox chết -> backup là phòng thủ thật.
# Muốn tiết kiệm đĩa dev: đổi xuống 2 (survive 1 VM). Prod-parity: giữ 3.
defaultClassReplicaCount: 3
defaultSettings:
defaultDataPath: /var/lib/longhorn # cần đủ chỗ trên MỌI node (đã resize +50-100G)
destination:
server: https://kubernetes.default.svc
namespace: longhorn-system
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true # tránh lỗi "metadata.annotations: Too long" trên CRD Longhorn
retry:
limit: 5
backoff:
duration: 15s
factor: 2
maxDuration: 5m