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

26 lines
761 B
Smarty
Raw Permalink Normal View History

2024-05-13 15:20:21 +00:00
{{- define "lib.pvc" -}}
{{- range $k, $v := .Values.storage }}
{{- $customName := printf "%s-%s" (include "chart.fullname" $) $k }}
---
# ---------------------------------------------------------------------
# This pvc is created as a part of softplayer helm library
# please see /lib/tempaltes/pvc/_pvc.tpl
# ---------------------------------------------------------------------
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 }}
2024-05-19 16:56:41 +00:00
{{- if ne $v.storageClassName "default" }}
2024-05-13 15:20:21 +00:00
storageClassName: {{ $v.storageClassName }}
{{- end }}
2024-05-19 16:56:41 +00:00
{{- end }}
2024-05-13 15:20:21 +00:00
{{- end -}}