_storage.tpl 690 B

1234567891011121314151617181920212223
  1. {{/*
  2. Retrieve host path from ix volumes based on dataset name
  3. */}}
  4. {{- define "retrieveHostPathFromiXVolume" -}}
  5. {{- range $index, $hostPathConfiguration := $.ixVolumes }}
  6. {{- $dsName := base $hostPathConfiguration.hostPath -}}
  7. {{- if eq $.datasetName $dsName -}}
  8. {{- $hostPathConfiguration.hostPath -}}
  9. {{- end -}}
  10. {{- end }}
  11. {{- end -}}
  12. {{/*
  13. Retrieve host path for minio
  14. */}}
  15. {{- define "configuredMinioHostPath" -}}
  16. {{- if .Values.minioHostPathEnabled -}}
  17. {{- .Values.minioHostPath -}}
  18. {{- else -}}
  19. {{- $volDict := dict "datasetName" $.Values.minioDataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
  20. {{- include "retrieveHostPathFromiXVolume" $volDict -}}
  21. {{- end -}}
  22. {{- end -}}