_storage.tpl 670 B

123456789101112131415161718192021
  1. {{/*
  2. Copyright Broadcom, Inc. All Rights Reserved.
  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 := (.global).storageClass | default .persistence.storageClass | default (.global).defaultStorageClass | default "" -}}
  12. {{- if $storageClass -}}
  13. {{- if (eq "-" $storageClass) -}}
  14. {{- printf "storageClassName: \"\"" -}}
  15. {{- else -}}
  16. {{- printf "storageClassName: %s" $storageClass -}}
  17. {{- end -}}
  18. {{- end -}}
  19. {{- end -}}