fix(grafana): Give GrafanaAdmin from OAuth2 groups, include kube-prometheus-stack dashbaords

This commit is contained in:
SeanOMik 2023-10-20 20:42:21 -04:00
parent 47d544c10f
commit c46536467f
Signed by: SeanOMik
GPG Key ID: 568F326C7EB33ACB
2 changed files with 10 additions and 1 deletions

View File

@ -47,6 +47,10 @@ spec:
auth_url: https://auth.${SECRET_NEW_DOMAIN}/application/o/authorize/
token_url: https://auth.${SECRET_NEW_DOMAIN}/application/o/token/
api_url: https://auth.${SECRET_NEW_DOMAIN}/application/o/userinfo/
role_attribute_path: contains(groups[*], 'authentik Admins') && 'GrafanaAdmin' #|| contains(info.groups[*], 'editor') && 'Editor' || 'Viewer'
groups_attribute_path: groups
name_attribute_path: preferred_username
login_attribute_path: email
allow_assign_grafana_admin: true
use_pkce: true
use_refresh_token: true
@ -66,8 +70,10 @@ spec:
datasources:
- name: Victoria
type: prometheus
editable: false
jsonData:
tlsSkipVerify: true
url: http://victoria-metrics-server.monitoring.svc:8428
editable: false
isDefault: true
# datasources:

View File

@ -39,6 +39,9 @@ spec:
grafana:
enabled: false
# enabled dashboards even with grafana being disabled
forceDeployDashboards: true
defaultDashboardsTimezone: America/New_York
prometheus:
ingress: