--- # Source: grafana/templates/configmap.yaml apiVersion: v1 kind: ConfigMap metadata: name: grafana namespace: default labels: helm.sh/chart: grafana-6.58.3 app.kubernetes.io/name: grafana app.kubernetes.io/instance: grafana app.kubernetes.io/version: "10.0.2" app.kubernetes.io/managed-by: Helm data: grafana.ini: | [analytics] check_for_updates = true [grafana_net] url = https://grafana.net [log] mode = console [paths] data = /var/lib/grafana/ logs = /var/log/grafana plugins = /var/lib/grafana/plugins provisioning = /etc/grafana/provisioning [server] domain = '' datasources.yaml: | apiVersion: 1 datasources: - isDefault: true name: Prometheus type: prometheus url: http://prometheus-server contactpoints.yaml: | apiVersion: 1 rules.yaml: | apiVersion: 1 dashboardproviders.yaml: | apiVersion: 1 providers: - disableDeletion: false editable: true folder: "" name: default options: path: /var/lib/grafana/dashboards/default orgId: 1 type: file download_dashboards.sh: | #!/usr/bin/env sh set -euf mkdir -p /var/lib/grafana/dashboards/default curl -skf \ --connect-timeout 60 \ --max-time 60 \ -H "Accept: application/json" \ -H "Content-Type: application/json;charset=UTF-8" \ "https://grafana.com/api/dashboards/13192/revisions/1/download" \ | sed '/-- .* --/! s/"datasource":.*,/"datasource": "Prometheus",/g' \ > "/var/lib/grafana/dashboards/default/gitea.json" curl -skf \ --connect-timeout 60 \ --max-time 60 \ -H "Accept: application/json" \ -H "Content-Type: application/json;charset=UTF-8" \ "https://grafana.com/api/dashboards/6671/revisions/2/download" \ | sed '/-- .* --/! s/"datasource":.*,/"datasource": "Prometheus",/g' \ > "/var/lib/grafana/dashboards/default/go.json" curl -skf \ --connect-timeout 60 \ --max-time 60 \ -H "Accept: application/json" \ -H "Content-Type: application/json;charset=UTF-8" \ "https://grafana.com/api/dashboards/12006/revisions/1/download" \ | sed '/-- .* --/! s/"datasource":.*,/"datasource": "Prometheus",/g' \ > "/var/lib/grafana/dashboards/default/kubernetes-apiserver.json" curl -skf \ --connect-timeout 60 \ --max-time 60 \ -H "Accept: application/json" \ -H "Content-Type: application/json;charset=UTF-8" \ "https://grafana.com/api/dashboards/9614/revisions/1/download" \ | sed '/-- .* --/! s/"datasource":.*,/"datasource": "Prometheus",/g' \ > "/var/lib/grafana/dashboards/default/nginx-ingress.json" curl -skf \ --connect-timeout 60 \ --max-time 60 \ -H "Accept: application/json" \ -H "Content-Type: application/json;charset=UTF-8" \ "https://grafana.com/api/dashboards/1860/revisions/32/download" \ | sed '/-- .* --/! s/"datasource":.*,/"datasource": "Prometheus",/g' \ > "/var/lib/grafana/dashboards/default/node.json" curl -skf \ --connect-timeout 60 \ --max-time 60 \ -H "Accept: application/json" \ -H "Content-Type: application/json;charset=UTF-8" \ "https://grafana.com/api/dashboards/9628/revisions/7/download" \ | sed '/-- .* --/! s/"datasource":.*,/"datasource": "Prometheus",/g' \ > "/var/lib/grafana/dashboards/default/postgresql.json" curl -skf \ --connect-timeout 60 \ --max-time 60 \ -H "Accept: application/json" \ -H "Content-Type: application/json;charset=UTF-8" \ "https://grafana.com/api/dashboards/10046/revisions/1/download" \ | sed '/-- .* --/! s/"datasource":.*,/"datasource": "Prometheus",/g' \ > "/var/lib/grafana/dashboards/default/synapse.json"