{{/* Retrieve host path from ix volumes based on dataset name */}} {{- define "retrieveHostPathFromiXVolume" -}} {{- range $index, $hostPathConfiguration := $.ixVolumes }} {{- $dsName := base $hostPathConfiguration.hostPath -}} {{- if eq $.datasetName $dsName -}} {{- $hostPathConfiguration.hostPath -}} {{- end -}} {{- end }} {{- end -}} {{/* Retrieve host path for minio */}} {{- define "configuredMinioHostPath" -}} {{- if .Values.minioHostPathEnabled -}} {{- .Values.minioHostPath -}} {{- else -}} {{- $volDict := dict "datasetName" $.Values.minioDataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}} {{- include "retrieveHostPathFromiXVolume" $volDict -}} {{- end -}} {{- end -}}