_storage.tpl 698 B

12345678910111213141516171819202122232425262728
  1. {{/*
  2. Copyright VMware, Inc.
  3. SPDX-License-Identifier: APACHE-2.0
  4. */}}
  5. {{/* vim: set filetype=mustache: */}}
  6. {{/*
  7. Return the proper Storage Class
  8. {{ include "common.storage.class" ( dict "persistence" .Values.path.to.the.persistence "global" $) }}
  9. */}}
  10. {{- define "common.storage.class" -}}
  11. {{- $storageClass := .persistence.storageClass -}}
  12. {{- if .global -}}
  13. {{- if .global.storageClass -}}
  14. {{- $storageClass = .global.storageClass -}}
  15. {{- end -}}
  16. {{- end -}}
  17. {{- if $storageClass -}}
  18. {{- if (eq "-" $storageClass) -}}
  19. {{- printf "storageClassName: \"\"" -}}
  20. {{- else }}
  21. {{- printf "storageClassName: %s" $storageClass -}}
  22. {{- end -}}
  23. {{- end -}}
  24. {{- end -}}