You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
698 B
Smarty
29 lines
698 B
Smarty
{{/*
|
|
Copyright VMware, Inc.
|
|
SPDX-License-Identifier: APACHE-2.0
|
|
*/}}
|
|
|
|
{{/* vim: set filetype=mustache: */}}
|
|
{{/*
|
|
Return the proper Storage Class
|
|
{{ include "common.storage.class" ( dict "persistence" .Values.path.to.the.persistence "global" $) }}
|
|
*/}}
|
|
{{- define "common.storage.class" -}}
|
|
|
|
{{- $storageClass := .persistence.storageClass -}}
|
|
{{- if .global -}}
|
|
{{- if .global.storageClass -}}
|
|
{{- $storageClass = .global.storageClass -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- if $storageClass -}}
|
|
{{- if (eq "-" $storageClass) -}}
|
|
{{- printf "storageClassName: \"\"" -}}
|
|
{{- else }}
|
|
{{- printf "storageClassName: %s" $storageClass -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|