From c4525dc6e2917d232fd5b6aca71652ff02ada45a Mon Sep 17 00:00:00 2001 From: rschnei87 <5205924+rschnei87@users.noreply.github.com> Date: Sun, 13 Oct 2024 17:14:03 -0500 Subject: [PATCH] Fix dataDirs.maxVolumes default value when not included in a values.yaml (#6119) --- k8s/charts/seaweedfs/templates/volume-statefulset.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml index e197bff85..e9194b485 100644 --- a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml @@ -146,7 +146,9 @@ spec: {{- if .Values.volume.idx }} -dir.idx=/idx \ {{- end }} - -max {{range $index, $dir := .Values.volume.dataDirs }}{{if ne $index 0}},{{end}}{{$dir.maxVolumes}}{{end}} \ + -max {{range $index, $dir := .Values.volume.dataDirs }}{{if ne $index 0}},{{end}} + {{- if eq ($dir.maxVolumes | toString) "0" }}0{{ else if not $dir.maxVolumes }}7{{ else }}{{$dir.maxVolumes}}{{ end }} + {{- end }} \ {{- if .Values.volume.rack }} -rack={{ .Values.volume.rack }} \ {{- end }}