adminUser: admin
adminPassword: test1234

service:
  type: ClusterIP

ingress:
  enabled: true
  ingressClassName: traefik
  annotations:
    traefik.ingress.kubernetes.io/router.entrypoints: websecure
    traefik.ingress.kubernetes.io/router.tls: "true"
  hosts:
    - grafana-int.dvirlabs.com

persistence:
  enabled: true
  storageClassName: nfs-client
  size: 1Gi
  accessModes:
    - ReadWriteOnce

datasources:
  datasources.yaml:
    apiVersion: 1
    datasources:
      - name: Prometheus
        type: prometheus
        access: proxy
        url: http://prometheus-prod-server
        isDefault: true

# ✅ טוען משתנים מה-Secret שנוצר ע״י ExternalSecret
envFromSecret: grafana-oidc-secret

grafana.ini:
  server:
    root_url: https://grafana-int.dvirlabs.com
  auth:
    disable_login_form: true
    disable_signout_menu: false
  auth.generic_oauth:
    enabled: true
    name: Keycloak
    allow_sign_up: true
    client_id: grafana
    client_secret: ${client_secret}
    scopes: openid profile email
    auth_url: https://keycloak.dvirlabs.com/realms/lab/protocol/openid-connect/auth
    token_url: https://keycloak.dvirlabs.com/realms/lab/protocol/openid-connect/token
    api_url: https://keycloak.dvirlabs.com/realms/lab/protocol/openid-connect/userinfo
    role_attribute_path: contains(groups[*], 'grafana-admins') && 'Admin' || 'Viewer'
    allow_assign_grafana_admin: true
