diff --git a/library/common/templates/lib/storage/_volume.tpl b/library/common/templates/lib/storage/_volume.tpl new file mode 100644 index 0000000000..2e15fa98d4 --- /dev/null +++ b/library/common/templates/lib/storage/_volume.tpl @@ -0,0 +1,17 @@ +{{/* +Retrieve volume configuration +*/}} +{{- define "common.volumeConfig" -}} +{{- $values := . -}} +{{- if hasKey $values "name" }} +- name: {{ $values.name }} +{{- if $values.emptyDirVolumes -}} + emptyDir: {} +{{- else -}} + hostPath: + path: {{ template "common.configuredHostPath" $values }} +{{- end -}} +{{- else -}} +{{- fail "Name must be specified for Volume Configuration" -}} +{{- end -}} +{{- end -}}