blob: 83f86a8491ea2283e17b8c2584b3f0bd32c547c8 [file] [log] [blame]
{{- $pvc := .Values.persistence -}}
{{- if $pvc.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ template "admin.name" . }}
namespace: {{ template "admin.namespace" . }}
labels:
{{- include "admin.labels" . | nindent 4 }}
{{- with $pvc.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- with $pvc.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes:
{{- with $pvc.accessModes }}
- {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ $pvc.size | quote }}
{{- with $pvc.storageclass }}
storageClassName: {{ . }}
{{- end }}
selector:
matchLabels:
{{- toYaml . | nindent 6 }}
{{- end }}