apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    app: {{ template "grafana.fullname" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    heritage: "{{ .Release.Service }}"
    release: "{{ .Release.Name }}"
  name: {{ template "grafana.server.fullname" . }}
data:
  {{- if .Values.serverDashboardFiles }}
{{ toYaml .Values.serverDashboardFiles | indent 2 }}
  {{- end }}
  {{- if .Values.dataSource }}
{{ toYaml .Values.dataSource | indent 2 }}
  {{- else }}
  prometheus-datasource.json: |+
    {
      "access": "proxy",
      "basicAuth": false,
      "name": "prometheus",
      "type": "prometheus",
      "url": "http://prometheus-prometheus:9090"
    }
  {{- end }}

apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    app: {{ template "grafana.fullname" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    heritage: "{{ .Release.Service }}"
    release: "{{ .Release.Name }}"
  name: {{ template "grafana.server.fullname" . }}
data:
  {{- if .Values.serverDashboardFiles }}
{{ toYaml .Values.serverDashboardFiles | indent 2 }}
  {{- end }}
  {{- if .Values.dataSource }}
{{ toYaml .Values.dataSource | indent 2 }}
  {{- else }}
  prometheus-datasource.json: |+
    {
      "access": "proxy",
      "basicAuth": false,
      "name": "prometheus",
      "type": "prometheus",
      "url": "http://{{ printf "%s-%s" .Release.Name "prometheus" }}:9090"
    }
  {{- end }}

Revert "Update prometheus datasource name"
Revert "Update prometheus datasource name"

This reverts commit 93554d0c9c4b480c94eb1777e2d3d7c9eafc59b8.
