add longhorn
This commit is contained in:
42
infra/cluster/00-longhorn.yaml
Normal file
42
infra/cluster/00-longhorn.yaml
Normal 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
|
||||
20
infra/cluster/root.yaml
Normal file
20
infra/cluster/root.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: infra-cluster-root
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://git.renolation.com/renolation/dbiz-lake-k8s.git
|
||||
targetRevision: main
|
||||
path: infra/cluster # quét chính thư mục này (gồm cả root.yaml -> tự quản)
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: argocd
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
Reference in New Issue
Block a user