{{- if .Values.datasources }} apiVersion: v1 kind: ConfigMap metadata: name: {{ include "perses.fullname" . }}-datasources labels: {{- include "perses.labels" . | nindent 4 }} app.kubernetes.io/component: configuration data: {{- range $.Values.datasources }} {{ .metadata.name | lower }}.json: |- {{- tpl (toJson .) $ | nindent 4 }} {{- end }} {{- end }}