Browse Source

fix(chart): all in one maxVolumes value (#8683)

* fix(chart): all-in-one deployment maxVolumes value

* chore(chart): improve readability

* fix(chart): maxVolume nil value check

* fix(chart): guard against nil/empty volume.dataDirs before calling first

Without this check, `first` errors when volume.dataDirs is nil or empty,
causing a template render failure for users who omit the setting entirely.

---------

Co-authored-by: Copilot <copilot@github.com>
pull/8685/head
hoppla20 4 days ago
committed by GitHub
parent
commit
efe722c18c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      k8s/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml

8
k8s/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml

@ -168,8 +168,12 @@ spec:
{{- if .Values.allInOne.disableHttp }}
-disableHttp={{ .Values.allInOne.disableHttp }} \
{{- end }}
{{- if and (.Values.volume.dataDirs) (index .Values.volume.dataDirs 0 "maxVolumes") }}
-volume.max={{ index .Values.volume.dataDirs 0 "maxVolumes" }} \
{{- if .Values.volume.dataDirs }}
{{- with (first .Values.volume.dataDirs) }}
{{- if and (hasKey . "maxVolumes") (ne .maxVolumes nil) }}
-volume.max={{ .maxVolumes }} \
{{- end }}
{{- end }}
{{- end }}
-master.port={{ .Values.master.port }} \
{{- if .Values.global.enableReplication }}

Loading…
Cancel
Save