40 lines
916 B
YAML
40 lines
916 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: {{ .Values.pvc.request | quote }}
|
|
local:
|
|
path: /var/lib/minikube
|
|
persistentVolumeReclaimPolicy: Retain
|
|
storageClassName: local-storage
|
|
volumeMode: Filesystem
|
|
nodeAffinity:
|
|
required:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
- key: kubernetes.io/hostname
|
|
operator: In
|
|
values:
|
|
- minikube
|
|
---
|
|
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: local-storage |