60e2a844f6ebd3f1e218891bf30069aa25ead3c8
[demo.git] / tutorials / ApacheCNF / templates / cba / Templates / k8s-configs / deployment-config / charts / common / templates / _storage.tpl
1 {{/* vim: set filetype=mustache: */}}
2 {{/*
3 Return  the proper Storage Class
4 {{ include "common.storage.class" ( dict "persistence" .Values.path.to.the.persistence "global" $) }}
5 */}}
6 {{- define "common.storage.class" -}}
7
8 {{- $storageClass := .persistence.storageClass -}}
9 {{- if .global -}}
10     {{- if .global.storageClass -}}
11         {{- $storageClass = .global.storageClass -}}
12     {{- end -}}
13 {{- end -}}
14
15 {{- if $storageClass -}}
16   {{- if (eq "-" $storageClass) -}}
17       {{- printf "storageClassName: \"\"" -}}
18   {{- else }}
19       {{- printf "storageClassName: %s" $storageClass -}}
20   {{- end -}}
21 {{- end -}}
22
23 {{- end -}}