{% if projects_persistence|bool and projects_existing_claim == '' %}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: '{{ meta.name }}-projects-claim'
  namespace: '{{ meta.namespace }}'
  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:
    - {{ projects_storage_access_mode }}
  resources:
    requests:
      storage: {{ projects_storage_size }}
{% if projects_storage_class is defined %}
  storageClassName: {{ projects_storage_class }}
{% endif %}
{% endif %}
