Datasource types

This example shows different types of datasources and how to configure them.

apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDatasource
metadata:
  name: prometheus
spec:
  instanceSelector:
    matchLabels:
      dashboards: "grafana"
  datasource:
    name: prom1
    type: prometheus
    access: proxy
    url: http://prometheus-service:9090
    isDefault: true
    jsonData:
      "tlsSkipVerify": true
      "timeInterval": "5s"
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDatasource
metadata:
  name: postgresql
  namespace: grafana
spec:
  instanceSelector:
    matchLabels:
      dashboards: "grafana"
  datasource:
    name: postgresql
    type: postgres
    jsonData:
      database: postgres
      connMaxLifetime: 14400
      maxIdleConns: 2
      maxOpenConns: 0
      postgresVersion: 1400
      sslmode: disable
      timescaledb: false
    access: proxy
    secureJsonData:
      password: postgres
    url: postgresql.namespace.svc:5432
    user: postgres