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>
This commit is contained in:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user