apiVersion: v1
kind: ConfigMap
metadata:
  name: grafana-config
  namespace: ft-services
data:
  datasources.yaml: |+
    apiVersion: 1
    datasources:
    - name: influxdb
      orgId: 1
      type: influxdb
      access: proxy
      url: "http://$INFLUXDB_HOST:8086"
      database: $INFLUXDB_DB
      editable: true
      basicAuth: true
      basicAuthUser: $INFLUXDB_MONITORING_USER
      basicAuthPassword: $INFLUXDB_MONITORING_PASSWORD
  providers.yaml: |+
    apiVersion: 1
    providers:
    - name: 'ft-services'
      type: file
      disableDeletion: false
      updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboards
      options:
        path: /usr/share/grafana/public/dashboards/ft-services
        foldersFromFilesStructure: true
