apiVersion: v1
kind: ConfigMap
metadata:
  name: grafana-configs
  namespace: monitoring-system
  labels:
    app.kubernetes.io/name: grafana
data:
  grafana.ini: |
    [paths]
    data = /var/lib/grafana/data
    logs = /var/log/grafana
    plugins = /var/lib/grafana/plugins
    provisioning = /etc/grafana/provisioning
    [server]
    root_url = https://dashboard.${SECRET_DOMAIN_0}
  datasources.yaml: |
    apiVersion: 1
    datasources:
      - name: Prometheus
        type: prometheus
        orgId: 1
        access: proxy
        url: http://prometheus-operated.monitoring-system.svc.cluster.local:9090
        isDefault: true
        editable: false
  watcher-dashboardproviders.yaml: |
    apiVersion: 1
    providers:
      - name: watcher-dashboardproviders
        type: file
        orgId: 1
        folder: ""
        options:
          path: /tmp/dashboards
          folderFromFilesStructure: false
        disableDeletion: false
        allowUiUpdates: false
        updateIntervalSeconds: 30
  plugins: grafana-piechart-panel
