aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislusf <chris.lu@gmail.com>2025-12-11 10:29:48 -0800
committerchrislusf <chris.lu@gmail.com>2025-12-11 10:29:48 -0800
commit8f2183e356d1690c9e0dc945317909b2034de89b (patch)
treef7091b87fb5ce0ed634baf3cabef53f1b90f2f14
parent2f62237d183aa312e1c306abd0481a1d66235a72 (diff)
downloadseaweedfs-csi-driver-8f2183e356d1690c9e0dc945317909b2034de89b.tar.xz
seaweedfs-csi-driver-8f2183e356d1690c9e0dc945317909b2034de89b.zip
fix: add validation to prevent invalid mountService.enabled=false config
Add a Helm validation check that fails with a clear error message when node.enabled is true but mountService.enabled is false. This prevents user error and guides users to the correct configuration.
-rw-r--r--deploy/helm/seaweedfs-csi-driver/templates/daemonset.yaml3
1 files changed, 3 insertions, 0 deletions
diff --git a/deploy/helm/seaweedfs-csi-driver/templates/daemonset.yaml b/deploy/helm/seaweedfs-csi-driver/templates/daemonset.yaml
index f3e97c3..ad1979f 100644
--- a/deploy/helm/seaweedfs-csi-driver/templates/daemonset.yaml
+++ b/deploy/helm/seaweedfs-csi-driver/templates/daemonset.yaml
@@ -1,3 +1,6 @@
+{{- if and .Values.node.enabled (not .Values.mountService.enabled) -}}
+{{- fail "mountService.enabled must be true when node.enabled is true. The CSI driver requires the mount service to function." -}}
+{{- end -}}
{{- if .Values.node.enabled}}
{{- $mountEndpoint := default .Values.mountService.endpoint .Values.node.mountEndpoint }}
{{- $mountSocketDir := default .Values.mountService.socketDir .Values.node.mountSocketDir }}