Merge "[AAI] Add model-loader tracing config"
[oom.git] / kubernetes / common / mongodb / common / templates / _storage.tpl
1 {{/*
2 Copyright VMware, Inc.
3 SPDX-License-Identifier: APACHE-2.0
4 */}}
5
6 {{/* vim: set filetype=mustache: */}}
7 {{/*
8 Return  the proper Storage Class
9 {{ include "common.storage.class" ( dict "persistence" .Values.path.to.the.persistence "global" $) }}
10 */}}
11 {{- define "common.storage.class" -}}
12
13 {{- $storageClass := .persistence.storageClass -}}
14 {{- if .global -}}
15     {{- if .global.storageClass -}}
16         {{- $storageClass = .global.storageClass -}}
17     {{- end -}}
18 {{- end -}}
19
20 {{- if $storageClass -}}
21   {{- if (eq "-" $storageClass) -}}
22       {{- printf "storageClassName: \"\"" -}}
23   {{- else }}
24       {{- printf "storageClassName: %s" $storageClass -}}
25   {{- end -}}
26 {{- end -}}
27
28 {{- end -}}