softplayer-helm-lib/charts/testing/templates/pvc/_pvc.tpl

19 lines
462 B
Smarty
Raw Normal View History

2024-05-05 16:51:37 +00:00
{{- define "lib.pvc" -}}
{{- range $k, $v := .Values.storage }}
{{- $customName := printf "%s-%s" (include "chart.fullname" $) $k }}
---
apiVersion: v1
kind: PersistentVolumeClaim
{{- include "lib.metadata" (dict "Context" $ "customName" $customName)}}
spec:
{{- with $v.accessModes }}
accessModes:
{{ toYaml . | indent 4}}
{{- end }}
resources:
requests:
storage: {{ $v.size }}
storageClassName: {{ $v.storageClassName }}
{{- end }}
{{- end -}}