apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ grafana_datasource_configmap_name }}
  namespace: {{ observability_namespace }}
  labels:
    grafana_datasource: "1"
data:
  datasources.yaml: |
    apiVersion: 1
    datasources:
{% if loki_enabled %}
      - name: Loki
        type: loki
        access: proxy
        url: "{{ grafana_loki_effective_url }}"
        isDefault: false
{% endif %}
