# Source: qmig/templates/app/app-pv.yaml
# REF: https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/cloud-storage-fuse-csi-driver#provision-static
apiVersion: v1
kind: PersistentVolume
metadata:
  name: qmig-shared
spec:
  capacity:
    storage: "5Gi"
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  storageClassName: "file-csi"
  mountOptions:
    - implicit-dirs
    - dir-mode=777
    - file-mode=777
  csi:
    driver: gcsfuse.csi.storage.gke.io
    volumeHandle: {{BUCKET_NAME}} ## GCP Bucket name
    readOnly: false
---
# Source: qmig/templates/app/app-pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  labels:
    app.kubernetes.io/name: qmig
  name: qmig-shared
  namespace: {{Namespace}}
spec:
  accessModes:
    - ReadWriteMany
  storageClassName: "file-csi"
  volumeName: qmig-shared
  resources:
    requests:
      storage: "5Gi"