apiVersion: v1
kind: PersistentVolume
metadata:
  name: mysqlbackup-storage-pv-01
  namespace: edoc2
  labels:
    name: mysqlbackup-storage-pv-01
spec:
  capacity:
    storage: 50Gi
  accessModes:
  - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: backup-mysql-storage01
  local:
    path: /data/mysqlbackup
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: node.mysqlbackup.labels
          operator: In
          values:
          - mysqlbackup-node01
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: mysqlbackup-storage-pv-02
  namespace: edoc2
  labels:
    name: mysqlbackup-storage-pv-02
spec:
  capacity:
    storage: 50Gi
  accessModes:
  - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: backup-mysql-storage02
  local:
    path: /data/mysqlbackup
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: node.mysqlbackup.labels
          operator: In
          values:
          - mysqlbackup-node02
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: mysqlbackup-storage-pv-03
  namespace: edoc2
  labels:
    name: mysqlbackup-storage-pv-03
spec:
  capacity:
    storage: 50Gi
  accessModes:
  - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: backup-mysql-storage03
  local:
    path: /data/mysqlbackup
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: node.mysqlbackup.labels
          operator: In
          values:
          - mysqlbackup-node03
