kube-exam/helm/exam/templates/volume.yaml

32 lines
724 B
YAML

apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ include "exam.fullname" . }}-postgres-pv
labels:
type: local
{{- include "exam.labels" . | nindent 4 }}
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 1Gi
hostPath:
path: /tmp/minikube/postgres
persistentVolumeReclaimPolicy: Retain
storageClassName: manual
volumeMode: Filesystem
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "exam.fullname" . }}-postgres-pv-claim
labels:
app: db
{{- include "exam.labels" . | nindent 4 }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.pvc.request | quote }}
storageClassName: {{ .Values.pvc.class | quote }}