{{- if index .Values.loki.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ .Values.loki.singleBinary.persistence.claimName }}
  namespace: {{ .Release.Namespace }}
  annotations:
    helm.sh/resource-policy: keep
spec:
  accessModes:
    - {{ .Values.loki.singleBinary.persistence.accessMode }}
  resources:
    requests:
      storage: {{ .Values.loki.singleBinary.persistence.size }}
  storageClassName: {{ .Values.loki.singleBinary.persistence.storageClassName }}
{{- end }}