---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: '{{ ansible_operator_meta.name }}-redis-data'
  namespace: "{{ ansible_operator_meta.namespace }}"
  labels:
    app.kubernetes.io/name: 'redis'
    app.kubernetes.io/instance: 'redis-{{ ansible_operator_meta.name }}'
    app.kubernetes.io/component: cache
    app.kubernetes.io/part-of: '{{ deployment_type }}'
    app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
spec:
  resources:
    requests:
      storage: 1Gi
  accessModes:
    - ReadWriteOnce
{% if redis_storage_class is defined %}
  storageClassName: '{{ redis_storage_class }}'
{% endif %}
