aboutsummaryrefslogtreecommitdiff
path: root/deploy
diff options
context:
space:
mode:
author泽淼 周 <zhouzemiao@ihuman.com>2025-09-27 11:39:58 +0800
committerChris Lu <chrislusf@users.noreply.github.com>2025-12-06 18:53:22 -0800
commit9b8a835d6ebb57d814ee190bb054080a87bf88ae (patch)
tree07053b02b0a3ea56afec45d359a42f9c4f9d0294 /deploy
parent0ac36d1301caacdc8672f66ca1b7c97d52490c7f (diff)
downloadseaweedfs-csi-driver-9b8a835d6ebb57d814ee190bb054080a87bf88ae.tar.xz
seaweedfs-csi-driver-9b8a835d6ebb57d814ee190bb054080a87bf88ae.zip
feat: helm config
Diffstat (limited to 'deploy')
-rw-r--r--deploy/helm/seaweedfs-csi-driver/templates/daemonset.yaml20
-rw-r--r--deploy/helm/seaweedfs-csi-driver/values.yaml24
2 files changed, 44 insertions, 0 deletions
diff --git a/deploy/helm/seaweedfs-csi-driver/templates/daemonset.yaml b/deploy/helm/seaweedfs-csi-driver/templates/daemonset.yaml
index 039137b..bec6d26 100644
--- a/deploy/helm/seaweedfs-csi-driver/templates/daemonset.yaml
+++ b/deploy/helm/seaweedfs-csi-driver/templates/daemonset.yaml
@@ -1,4 +1,7 @@
{{- if .Values.node.enabled}}
+{{- $mountEndpoint := default .Values.mountService.endpoint .Values.node.mountEndpoint }}
+{{- $mountSocketDir := default .Values.mountService.socketDir .Values.node.mountSocketDir }}
+{{- $mountHostPath := default .Values.mountService.hostPath .Values.node.mountHostPath }}
---
kind: DaemonSet
apiVersion: apps/v1
@@ -41,6 +44,9 @@ spec:
- --filer=$(SEAWEEDFS_FILER)
- --nodeid=$(NODE_ID)
- --driverName=$(DRIVER_NAME)
+ {{- if $mountEndpoint }}
+ - --mountEndpoint=$(MOUNT_ENDPOINT)
+ {{- end }}
- --cacheDir=/var/cache/seaweedfs
{{- if ne "none" .Values.dataLocality}}
- "--dataLocality={{ .Values.dataLocality }}"
@@ -66,6 +72,10 @@ spec:
fieldPath: spec.nodeName
- name: DRIVER_NAME
value: {{ .Values.driverName | quote }}
+ {{- if $mountEndpoint }}
+ - name: MOUNT_ENDPOINT
+ value: {{ $mountEndpoint | quote }}
+ {{- end }}
{{- if .Values.node.injectTopologyInfoFromNodeLabel.enabled }}
- name: DATACENTER
valueFrom:
@@ -124,6 +134,10 @@ spec:
{{- end }}
- name: cache
mountPath: /var/cache/seaweedfs
+ {{- if and $mountEndpoint $mountSocketDir }}
+ - name: mount-socket-dir
+ mountPath: {{ $mountSocketDir }}
+ {{- end }}
resources: {{ toYaml .Values.node.resources | nindent 12 }}
# driver registrar
@@ -219,4 +233,10 @@ spec:
secret:
secretName: {{ .Values.tlsSecret }}
{{- end }}
+ {{- if and $mountEndpoint $mountHostPath }}
+ - name: mount-socket-dir
+ hostPath:
+ path: {{ $mountHostPath }}
+ type: DirectoryOrCreate
+ {{- end }}
{{- end }}
diff --git a/deploy/helm/seaweedfs-csi-driver/values.yaml b/deploy/helm/seaweedfs-csi-driver/values.yaml
index 8bfc743..1be64a3 100644
--- a/deploy/helm/seaweedfs-csi-driver/values.yaml
+++ b/deploy/helm/seaweedfs-csi-driver/values.yaml
@@ -71,6 +71,27 @@ seaweedfsCsiPlugin:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
+mountService:
+ enabled: true
+ image: zemiaozhou/seaweedfs-mount:latest
+ endpoint: unix:///var/lib/seaweedfs-mount/seaweedfs-mount.sock
+ hostPath: /var/lib/seaweedfs-mount
+ socketDir: /var/lib/seaweedfs-mount
+ updateStrategy:
+ type: RollingUpdate
+ rollingUpdate:
+ maxUnavailable: 25%
+ affinity: {}
+ tolerations:
+ resources: {}
+ livenessProbe:
+ failureThreshold:
+ initialDelaySeconds: 10
+ timeoutSeconds: 3
+ periodSeconds: 60
+ priorityClassName: system-node-critical
+ serviceAccountName: ""
+
driverName: seaweedfs-csi-driver
controller:
@@ -93,6 +114,9 @@ dataLocality: "none"
node:
# Deploy node daemonset
enabled: true
+ mountEndpoint: ""
+ mountSocketDir: ""
+ mountHostPath: ""
# When seaweedfs-csi-driver-node pod on node is recreated, all pods on same node using seaweed-csi PV will stop working.
# For safe update set updateStrategy.type: OnDelete and manually move pods who use seaweed-csi PV, then delete seaweedfs-csi-driver-node damonset pod
updateStrategy: