---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ deployment_name }}-backup-claim
  namespace: {{ backup_pvc_namespace }}
  ownerReferences: null
  labels:
    app.kubernetes.io/name: '{{ meta.name }}'
    app.kubernetes.io/part-of: '{{ meta.name }}'
    app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
    app.kubernetes.io/component: '{{ deployment_type }}'
    app.kubernetes.io/operator-version: '{{ lookup("env", "OPERATOR_VERSION") }}'
spec:
  accessModes:
    - ReadWriteOnce
{% if backup_storage_class is defined %}
  storageClassName: {{ backup_storage_class }}
{% endif %}
  resources:
    requests:
      storage: {{ backup_storage_requirements | default('5Gi', true) }}
