---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Retain
allowedTopologies:
  - matchLabelExpressions:
      - key: doris-be-node
        values: ["true"]

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: doris-be-pv-node1
spec:
  capacity:
    storage: 1500Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: local-storage
  local:
    path: /data/doris-be/storage
  nodeAffinity:
    required:
      nodeSelectorTerms:
        - matchExpressions:
            - key: kubernetes.io/hostname
              operator: In
              values: ["192.168.10.17"]

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: doris-be-pv-node2
spec:
  capacity:
    storage: 1500Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: local-storage
  local:
    path: /data/doris-be/storage
  nodeAffinity:
    required:
      nodeSelectorTerms:
        - matchExpressions:
            - key: kubernetes.io/hostname
              operator: In
              values: ["192.168.10.18"]

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: doris-be-pv-node3
spec:
  capacity:
    storage: 1500Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: local-storage
  local:
    path: /data/doris-be/storage
  nodeAffinity:
    required:
      nodeSelectorTerms:
        - matchExpressions:
            - key: kubernetes.io/hostname
              operator: In
              values: ["192.168.10.19"]

