_storage.tpl 628 B

1234567891011121314151617181920212223
  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. {{- $storageClass := .persistence.storageClass -}}
  8. {{- if .global -}}
  9. {{- if .global.storageClass -}}
  10. {{- $storageClass = .global.storageClass -}}
  11. {{- end -}}
  12. {{- end -}}
  13. {{- if $storageClass -}}
  14. {{- if (eq "-" $storageClass) -}}
  15. {{- printf "storageClassName: \"\"" -}}
  16. {{- else }}
  17. {{- printf "storageClassName: %s" $storageClass -}}
  18. {{- end -}}
  19. {{- end -}}
  20. {{- end -}}