{{- if or (or .Values.local.logs.enabled .Values.local.metrics.enabled) .Values.local.traces.enabled }} --- apiVersion: v1 kind: ConfigMap metadata: name: loki-datasources-provisioning namespace: {{ $.Release.Namespace }} data: datasources.yaml: | # Configuration file version apiVersion: 1 # List of data sources to delete from the database. deleteDatasources: - name: Loki orgId: 1 # List of data sources to insert/update depending on what's # available in the database. datasources: # Sets the name you use to refer to # the data source in panels and queries. {{- if .Values.local.logs.enabled }} - name: Loki # Sets the data source type. type: loki # Sets the organization id. Defaults to orgId 1. orgId: 1 # Sets a custom UID to reference this # data source in other parts of the configuration. # If not specified, Grafana generates one. uid: loki_ds # Sets the data source's URL, including the # port. url: http://loki-gateway.{{- $.Release.Namespace -}}.svc.cluster.local # Toggles whether the data source is pre-selected # for new panels. You can set only one default # data source per organization. isDefault: # Allows users to edit data sources from the # Grafana UI. editable: true {{- end }} {{- if .Values.local.metrics.enabled }} - name: Mimir # Sets the data source type. type: prometheus # Sets the organization id. Defaults to orgId 1. orgId: 1 # Sets a custom UID to reference this # data source in other parts of the configuration. # If not specified, Grafana generates one. uid: mimir_ds # Sets the data source's URL, including the # port. url: http://{{- $.Release.Name -}}-mimir-nginx.{{- $.Release.Namespace -}}.svc:80/prometheus # Toggles whether the data source is pre-selected # for new panels. You can set only one default # data source per organization. isDefault: # Allows users to edit data sources from the # Grafana UI. editable: true {{- end }} {{- if .Values.local.traces.enabled }} - name: Tempo # Sets the data source type. type: tempo # Sets the organization id. Defaults to orgId 1. orgId: 1 # Sets a custom UID to reference this # data source in other parts of the configuration. # If not specified, Grafana generates one. uid: tempo_ds # Sets the data source's URL, including the # port. url: http://{{- $.Release.Name -}}-tempo-query-frontend.{{- $.Release.Namespace -}}.svc:3100 # Toggles whether the data source is pre-selected # for new panels. You can set only one default # data source per organization. isDefault: # Allows users to edit data sources from the # Grafana UI. editable: true {{- end }} {{- end }}