{{- with index .Values "matrix-synapse" -}}
{{- if .enabled -}}
apiVersion: v1
kind: PersistentVolume
metadata:
  name: matrix-synapse-pv
spec:
  capacity:
    storage: 2Pi
  volumeMode: Filesystem
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  storageClassName: hostpath
  hostPath:
    path: /data/{{ $.Values.customer }}/data/matrix-synapse
    type: DirectoryOrCreate
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: matrix-synapse-data
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Pi
  volumeName: matrix-synapse-pv
  storageClassName: hostpath
{{- end -}}
{{- end -}}
