---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ deployment_name }}-backup-claim
  namespace: {{ backup_pvc_namespace }}
  labels:
    app.kubernetes.io/name: '{{ deployment_type }}-backup-storage'
    app.kubernetes.io/instance: '{{ deployment_type }}-backup-storage-{{ ansible_operator_meta.name }}'
    app.kubernetes.io/component: backup-storage
    app.kubernetes.io/part-of: '{{ deployment_type }}'
    app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
spec:
  accessModes:
    - ReadWriteOnce
{% if backup_storage_class != '' %}
  storageClassName: {{ backup_storage_class }}
{% endif %}
  resources:
    requests:
      storage: {{ backup_storage_requirements | default('5Gi', true) }}
