{{- if and (not .Values.loki.existingSecretForConfig) (not .Values.loki.configAsSecret) -}} apiVersion: v1 kind: ConfigMap metadata: name: {{ include "loki.fullname" . }} namespace: {{ .Release.Namespace }} labels: {{- include "loki.labels" . | nindent 4 }} data: config.yaml: | {{- tpl (mergeOverwrite (tpl .Values.loki.config . | fromYaml) .Values.loki.structuredConfig | toYaml) . | nindent 4 }} {{- end -}}