123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- {{/*
- Retrieve volume configuration
- This expects a dictionary in the following format:
- {
- "name": string,
- "emptyDirVolumes": boolean,
- "ixVolumes": list,
- "hostPathEnabled": boolean,
- "pathField": string,
- "datasetName": string,
- }
- */}}
- {{- define "common.storage.volumeConfig" -}}
- {{- $values := . -}}
- {{- include "common.schema.validateKeys" (dict "values" $values "checkKeys" (list "name")) -}}
- - name: {{ $values.name }}
- {{- if $values.emptyDirVolumes -}}
- emptyDir: {}
- {{- else -}}
- hostPath:
- path: {{ template "common.storage.configuredHostPath" $values }}
- {{- end -}}
- {{- end -}}
- {{/*
- Retrieve configuration for volumes
- This expects a dictionary to be provided in the following format:
- {
- "ixVolumes": list,
- "volumes": [
- {
- "name": string,
- "emptyDirVolumes": boolean,
- "hostPathEnabled": boolean,
- "pathField": string,
- "datasetName": string,
- }
- ] ( list of dicts )
- }
- */}}
- {{- define "common.storage.volumesConfiguration" -}}
- {{- $values := . -}}
- {{- include "common.schema.validateKeys" (dict "values" $values "checkKeys" (list "ixVolumes" "volumes")) -}}
- {{- range $vol := $values.volumes -}}
- {{- $_ := set $vol "ixVolumes" $values.ixVolumes -}}
- {{- include "common.storage.volumeConfig" $vol -}}
- {{- end -}}
- {{- end -}}
|