From fabb89b79e4e6bc51002b060e15658b4974899aa Mon Sep 17 00:00:00 2001 From: Claude Ebaneck Date: Sun, 16 Aug 2020 14:10:33 +0200 Subject: [PATCH] re-render prometheus-operator charts with Grafana role attribute This chart is rendered using: ``` ./charts/render.py prometheus-operator --namespace metalk8s-monitoring \ charts/prometheus-operator.yaml charts/prometheus-operator/ \ --service-config grafana metalk8s-grafana-config metalk8s/addons/prometheus-operator/config/grafana.yaml metalk8s-monitoring \ --service-config prometheus metalk8s-prometheus-config metalk8s/addons/prometheus-operator/config/prometheus.yaml metalk8s-monitoring \ --service-config alertmanager metalk8s-alertmanager-config metalk8s/addons/prometheus-operator/config/alertmanager.yaml metalk8s-monitoring \ --service-config dex metalk8s-dex-config metalk8s/addons/dex/config/dex.yaml metalk8s-auth \ > salt/metalk8s/addons/prometheus-operator/deployed/chart.sls ``` Closes: #2653 --- salt/metalk8s/addons/prometheus-operator/deployed/chart.sls | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/salt/metalk8s/addons/prometheus-operator/deployed/chart.sls b/salt/metalk8s/addons/prometheus-operator/deployed/chart.sls index 5a3d26763c..55a1565539 100644 --- a/salt/metalk8s/addons/prometheus-operator/deployed/chart.sls +++ b/salt/metalk8s/addons/prometheus-operator/deployed/chart.sls @@ -4,9 +4,11 @@ {% import_yaml 'metalk8s/addons/prometheus-operator/config/grafana.yaml' as grafana_defaults with context %} {% import_yaml 'metalk8s/addons/prometheus-operator/config/prometheus.yaml' as prometheus_defaults with context %} {% import_yaml 'metalk8s/addons/prometheus-operator/config/alertmanager.yaml' as alertmanager_defaults with context %} +{% import_yaml 'metalk8s/addons/dex/config/dex.yaml' as dex_defaults with context %} {%- set grafana = salt.metalk8s_service_configuration.get_service_conf('metalk8s-monitoring', 'metalk8s-grafana-config', grafana_defaults) %} {%- set prometheus = salt.metalk8s_service_configuration.get_service_conf('metalk8s-monitoring', 'metalk8s-prometheus-config', prometheus_defaults) %} {%- set alertmanager = salt.metalk8s_service_configuration.get_service_conf('metalk8s-monitoring', 'metalk8s-alertmanager-config', alertmanager_defaults) %} +{%- set dex = salt.metalk8s_service_configuration.get_service_conf('metalk8s-auth', 'metalk8s-dex-config', dex_defaults) %} {% raw %} @@ -327,6 +329,7 @@ data: client_id = grafana-ui client_secret = 4lqK98NcsWG5qBRHJUqYM1 enabled = true + role_attribute_path = contains(email, '{% endraw -%}{{ dex.spec.localuserstore.userlist[0]['email'] }}{%- raw %}') && 'Admin' scopes = openid profile email groups tls_skip_verify_insecure = true token_url = "{% endraw -%}https://{{ grains.metalk8s.control_plane_ip }}:8443/oidc/token{%- raw %}" @@ -51232,7 +51235,7 @@ spec: template: metadata: annotations: - checksum/config: 7b469c4cdb154cb1f2987d376bbd99cd9757f2aab45bc90ee521824e329c24d2 + checksum/config: 99946dc6287166fccab96ec15282aa472c91e332872d5ad4a89dca37ff7f30ee checksum/dashboards-json-config: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b checksum/sc-dashboard-provider-config: d8d82dc736b65dc3ccf0e743a2f7a371fe340cf2874c76f164366f347b23b6b4 checksum/secret: 0b5d0cba774f73eb434cecec5282d028eb34e57b1ff23bb3aa075519de6d1892