From 91fb73c5428bdbb67e013738753ed632edc0c49c Mon Sep 17 00:00:00 2001
From: Ryan Garcia <garcia.ryan@solute.us>
Date: Fri, 29 Jan 2021 17:55:48 +0000
Subject: [PATCH] feat: Grafana OIDC template and documentation

Adding default values to grafana.ini templating.
---
 chart/templates/monitoring/monitoring-helmrelease.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/chart/templates/monitoring/monitoring-helmrelease.yaml b/chart/templates/monitoring/monitoring-helmrelease.yaml
index 670be3fc4b..3d69a3ccb4 100644
--- a/chart/templates/monitoring/monitoring-helmrelease.yaml
+++ b/chart/templates/monitoring/monitoring-helmrelease.yaml
@@ -61,12 +61,12 @@ spec:
           enabled: {{ .Values.monitoring.sso.enabled }}
           client_id: {{ .Values.monitoring.sso.grafana.client_id }}
           client_secret: {{ .Values.monitoring.sso.grafana.client_secret }}
-          scopes: {{ .Values.monitoring.sso.grafana.scopes }}
+          scopes: {{ .Values.monitoring.sso.grafana.scopes | default "openid profile email" }}
           auth_url: https://{{ .Values.sso.oidc.host }}/auth/realms/{{ .Values.sso.oidc.realm }}/protocol/openid-connect/auth
           token_url: https://{{ .Values.sso.oidc.host }}/auth/realms/{{ .Values.sso.oidc.realm }}/protocol/openid-connect/token
           api_url: https://{{ .Values.sso.oidc.host }}/auth/realms/{{ .Values.sso.oidc.realm }}/protocol/openid-connect/userinfo
-          allow_sign_up: {{ .Values.monitoring.sso.grafana.allow_sign_up }}
-          role_attribute_path: {{ .Values.monitoring.sso.grafana.role_attribute_path }}
+          allow_sign_up: {{ .Values.monitoring.sso.grafana.allow_sign_up | default "True" }}
+          role_attribute_path: {{ .Values.monitoring.sso.grafana.role_attribute_path | default "Viewer" }}
 
     prometheus-node-exporter:
       serviceAccount:
@@ -100,4 +100,4 @@ spec:
       namespace: {{ .Release.Namespace }}
   {{- end }}
   {{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
-- 
GitLab