Skip to content

Commit 6e0e4d5

Browse files
committed
feat(k3s): add PVC with longhorn
1 parent 134d1fe commit 6e0e4d5

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Longhorn Distributed Storage for K3s
2+
# Reference: https://longhorn.io/docs/latest/deploy/install/install-with-helm/
3+
4+
# Default settings for new volumes
5+
defaultSettings:
6+
# 2 replicas = data on 2 of 3 nodes (survives 1 node failure)
7+
defaultReplicaCount: 2
8+
9+
# Storage path on nodes
10+
defaultDataPath: /var/lib/longhorn
11+
12+
# Automatic salvage for faulted replicas
13+
autoSalvage: true
14+
15+
# Allow scheduling on control-plane nodes (all our nodes are control-plane)
16+
allowNodeDrainWithLastHealthyReplica: false
17+
18+
# Replica auto-balance when nodes are added/removed
19+
replicaAutoBalance: best-effort
20+
21+
# Backup target (configure for DO Spaces later if needed)
22+
# backupTarget: s3://bucket-name@region/
23+
# backupTargetCredentialSecret: longhorn-backup-secret
24+
25+
# Persistence settings
26+
persistence:
27+
# Don't set as default yet - keep local-path as default
28+
# Change to true after migrating existing workloads
29+
defaultClass: false
30+
31+
defaultClassReplicaCount: 2
32+
33+
# RWO is typical for databases
34+
defaultFsType: ext4
35+
36+
# Reclaim policy
37+
reclaimPolicy: Delete
38+
39+
# Resource limits for Longhorn components
40+
resources:
41+
limits:
42+
cpu: 500m
43+
memory: 512Mi
44+
requests:
45+
cpu: 100m
46+
memory: 128Mi
47+
48+
# Longhorn Manager
49+
longhornManager:
50+
priorityClass: ~
51+
tolerations: []
52+
nodeSelector: {}
53+
54+
# Longhorn Driver
55+
longhornDriver:
56+
priorityClass: ~
57+
tolerations: []
58+
nodeSelector: {}
59+
60+
# Longhorn UI
61+
longhornUI:
62+
replicas: 1
63+
priorityClass: ~
64+
tolerations: []
65+
nodeSelector: {}
66+
67+
# Ingress for UI (disabled - access via kubectl port-forward)
68+
ingress:
69+
enabled: false
70+
71+
# Service for UI
72+
service:
73+
ui:
74+
type: ClusterIP
75+
manager:
76+
type: ClusterIP
77+
78+
# Enable CSI snapshots
79+
csi:
80+
attacherReplicaCount: 2
81+
provisionerReplicaCount: 2
82+
resizerReplicaCount: 2
83+
snapshotterReplicaCount: 2

0 commit comments

Comments
 (0)