{{- if and (eq .Values.ruler.kind "Deployment") .Values.ruler.enabled .Values.ruler.persistence.enabled }} apiVersion: v1 kind: PersistentVolumeClaim metadata: name: data-{{ include "loki.rulerFullname" . }} labels: {{- include "loki.rulerLabels" . | nindent 4 }} {{- with .Values.ruler.persistence.annotations }} annotations: {{- . | toYaml | nindent 4 }} {{- end }} spec: accessModes: - ReadWriteOnce {{- with .Values.ruler.persistence.storageClass }} storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} {{- end }} resources: requests: storage: "{{ .Values.ruler.persistence.size }}" {{- end }}