# istio_values-grafana.yaml
# Avoid creating a bunch of RBAC rules for features we are not enabling
rbac:
  create: false
  pspEnabled: false

# Disable test pods
testFramework:
  enabled: false

podLabels:
  sidecar.istio.io/inject: "false"

# Demo only, so we will have no authentication
admin:
  existingSecret: ""
ldap:
  existingSecret: true
env:
  GF_SECURITY_ADMIN_USER: "admin"
  GF_SECURITY_ADMIN_PASSWORD: "admin"
  GF_AUTH_BASIC_ENABLED: "false"
  GF_AUTH_ANONYMOUS_ENABLED: "true"
  GF_AUTH_ANONYMOUS_ORG_ROLE: Admin

# Expose on port 3000 to match the Istio docs
service:
  port: 3000

securityContext: null

# Set up out dashboards
dashboardProviders:
  dashboardproviders.yaml:
    apiVersion: 1
    providers:
      - name: "istio"
        orgId: 1
        folder: "istio"
        type: file
        disableDeletion: false
        options:
          path: /var/lib/grafana/dashboards/istio
      - name: "istio-services"
        orgId: 1
        folder: "istio"
        type: file
        disableDeletion: false
        options:
          path: /var/lib/grafana/dashboards/istio-services

dashboardsConfigMaps:
  istio: "istio-grafana-dashboards"
  istio-services: "istio-services-grafana-dashboards"

# Configure the prometheus data source. We expect prometheus:9090 in the same namespace
datasources:
  datasources.yaml:
    apiVersion: 1
    datasources:
      - name: Prometheus
        type: prometheus
        orgId: 1
        url: http://prometheus:9090
        access: proxy
        isDefault: true
        jsonData:
          timeInterval: 15s
        editable: true
      - name: Loki
        type: loki
        orgId: 1
        url: http://loki:3100
        access: proxy
        isDefault: false
        jsonData:
          timeInterval: 5s
        editable: true