From 6381eb801ca389e26026fee65f6726f7618c4dbe Mon Sep 17 00:00:00 2001 From: chrislu Date: Sat, 6 Dec 2025 12:28:16 -0800 Subject: [PATCH] helm: fix extraArgs trailing backslash issue Remove trailing backslash after the last extraArgs argument to avoid shell syntax error. Use counter to only add backslash between arguments. --- .../templates/all-in-one/all-in-one-deployment.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/k8s/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml b/k8s/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml index bb72f8772..554807e61 100644 --- a/k8s/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml +++ b/k8s/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml @@ -297,8 +297,9 @@ spec: -sftp.userStoreFile=/etc/sw/sftp/seaweedfs_sftp_config \ {{- end }} {{- end }} - {{- range .Values.allInOne.extraArgs }} - {{ . }} \ + {{- $extraArgsCount := len .Values.allInOne.extraArgs }} + {{- range $i, $arg := .Values.allInOne.extraArgs }} + {{ $arg }}{{ if ne (add1 $i) $extraArgsCount }} \{{ end }} {{- end }} volumeMounts: