From 1e23c5e813fe5175d4be45c5be1b820961d88f16 Mon Sep 17 00:00:00 2001 From: chrislusf Date: Thu, 11 Dec 2025 10:29:48 -0800 Subject: 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. --- deploy/helm/seaweedfs-csi-driver/templates/daemonset.yaml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'deploy') 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 }} -- cgit v1.2.3