| {{- $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 }} |