kind: PersistentVolume
apiVersion: v1
metadata:
  name: postgres-pv-volume
  labels:
    type: local
    app: postgres
spec:
  storageClassName: manual
  capacity:
    storage: 5Gi
  accessModes:
    - ReadWriteMany
  hostPath:
    path: "{{ .Values.global.IMXC_POSTGRES_PV_PATH }}"
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: {{ .Values.global.affinity_key }}
          operator: In
          values:
          - {{ .Values.global.affinity_value1 }}
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: postgres-pv-claim
  namespace: imxc
  labels:
    app: postgres
spec:
  storageClassName: manual
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 5Gi
