apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: nextcloud-config-pvc
  namespace: nextcloud
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 5Gi
  storageClassName: local-path   # match mariadb local-path style
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv-nextcloud-config
  labels:
    app: nextcloud
spec:
  capacity:
    storage: 5Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: local-path
  claimRef:
    namespace: nextcloud
    name: nextcloud-config-pvc
  hostPath:
    path: /var/lib/nextcloud/nextcloud-config
    type: DirectoryOrCreate
