github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/pkg/scanners/helm/test/mysql/charts/common/templates/_storage.tpl (about) 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 -}}