infra4talos/apps-helm/wg-access-server/templates/pvc.yaml

30 lines
859 B
YAML
Raw Normal View History

{{- if .Values.persistence.enabled -}}
{{- $fullName := include "wg-access-server.fullname" . -}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: "{{ $fullName }}"
labels:
{{- include "wg-access-server.labels" . | nindent 4 }}
{{- with .Values.persistence.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes:
{{ toYaml .Values.persistence.accessModes | indent 4 }}
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- if .Values.persistence.volumeBindingMode }}
volumeBindingModeName: "{{ .Values.persistence.volumeBindingMode }}"
{{- end }}
resources:
requests:
storage: "{{ .Values.persistence.size }}"
{{- end -}}