---
kind: PersistentVolume
apiVersion: v1
metadata:
  labels:
    type: ${storageclass}
    app: postgres
    role: postgres-data
  name: postgres-pv
  namespace: postgres
spec:
  capacity:
    storage: 50Gi
  accessModes:
    - ReadWriteOnce
  storageClassName: ${storageclass}
  local:
    path: /datadrive/postgres-data
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: "${selectorkey}"
          operator: In
          values:
          - "${selectorvalue}"
  persistentVolumeReclaimPolicy: Retain
