apiVersion: v1
kind: PersistentVolume
metadata:
  name: bitwarden-local-pv
  labels:
    type: local
    name: bitwarden
spec:
  capacity:
    storage: 2Gi
  volumeMode: Filesystem
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Delete
  storageClassName: local-storage
  local:
    path: /mnt/k8s/bitwarden
  nodeAffinity:
    required:
      nodeSelectorTerms:
        - matchExpressions:
            - key: kubernetes.io/hostname
              operator: In
              values:
                - server-3
---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  namespace: home-apps
  name: bitwarden-local-pvc
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: local-storage
  resources:
    requests:
      storage: 2Gi
