Skip to content

Commit

Permalink
re-render prometheus-operator charts with Grafana role attribute
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ebaneck committed Aug 17, 2020
1 parent ac1fc80 commit fabb89b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion salt/metalk8s/addons/prometheus-operator/deployed/chart.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

Expand Down Expand Up @@ -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 %}"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fabb89b

Please sign in to comment.