# Source: grafana/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: grafana
  namespace: jx
  labels:
    helm.sh/chart: grafana-6.6.3
    app.kubernetes.io/name: grafana
    app.kubernetes.io/instance: grafana
    app.kubernetes.io/version: "7.4.3"
    app.kubernetes.io/managed-by: Helm
    gitops.jenkins-x.io/pipeline: 'namespaces'
  annotations:
    meta.helm.sh/release-name: 'grafana'
data:
  plugins: grafana-github-datasource
  grafana.ini: |
    [analytics]
    check_for_updates = false
    reporting_enabled = false
    [dashboards]
    default_home_dashboard_path = /tmp/dashboards/jenkins-x.json
    [grafana_net]
    url = https://grafana.net
    [log]
    mode = console
    [paths]
    data = /var/lib/grafana/data
    logs = /var/log/grafana
    plugins = /var/lib/grafana/plugins
    provisioning = /etc/grafana/provisioning
    [server]
    domain = grafana-jx.dev.jenkins-x.me
    root_url = http://grafana-jx.dev.jenkins-x.me
    serve_from_sub_path = true
  datasources.yaml: |
    apiVersion: 1
    datasources:
    - database: dev
      isDefault: true
      jsonData:
        connMaxLifetime: 14400
        maxIdleConns: 2
        maxOpenConns: 0
        postgresVersion: 1200
        sslmode: disable
        timescaledb: false
      name: jx
      secureJsonData:
        password: ${JX_DB}
      type: postgres
      url: localhost:5432
      user: read
    - name: GitHub
      secureJsonData:
        accessToken: ${GITHUB_TOKEN}
  notifiers.yaml: |
    delete_notifiers: []
    notifiers:
    - is_default: true
      name: prometheus-alertmanager
      org_id: 1
      settings:
        url: http://prometheus-alertmanager.jx-observability
      type: prometheus-alertmanager
      uid: prometheus-alertmanager
