{{- if .Values.ruler.enabled }}
{{- range $dir, $files := .Values.ruler.directories }}
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "cortex.rulerFullname" $ }}-{{ include "cortex.rulerRulesDirName" $dir }}
  namespace: {{ $.Release.Namespace }}
  labels:
    {{- include "cortex.rulerLabels" $ | nindent 4 }}
data:
  {{- toYaml $files | nindent 2}}
{{- end }}
{{- end }}
