Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
devops:deploy_prometheus_on_kubernetes_using_prometheus-operator [2020/01/23 14:57] – [Deleting] admindevops:deploy_prometheus_on_kubernetes_using_prometheus-operator [2020/09/17 06:43] – [OpenID для входа в grafana] admin
Line 1: Line 1:
 +====== Installing ======
 +<code>kubectl create ns monitoring
 +helm install --name prometheus-operator --namespace monitoring stable/prometheus-operator
 +</code>
  
 +====== Deleting ======
 +<code>helm del --purge prometheus-operator
 +kubectl delete ns monitoring
 +kubectl delete crd alertmanagers.monitoring.coreos.com podmonitors.monitoring.coreos.com prometheuses.monitoring.coreos.com prometheusrules.monitoring.coreos.com servicemonitors.monitoring.coreos.com
 +kubectl delete service -n kube-system prometheus-prometheus-oper-kubelet
 +</code>
 +
 +====== values.yaml ======
 +https://github.com/helm/charts/blob/master/stable/prometheus-operator/values.yaml
 +
 +====== OpenID для входа в grafana ======
 +https://steemit.com/grafana/@timoschuetz/setting-up-grafana-oauth2-in-kubernetes \\
 +Вот пример настроек **grafana** для авторизации пользователей из **Active Directory**, которые аутентифицируются на **Keycloak**. Тут важно обратить внимание на то, что роли пользователей задаются в соответствии с группами, в которые входит пользователь (параметр **role_attribute_path**), а имена групп должны быть со слешем в начале: **/Grafana_Editor**.
 +<code>
 +  grafana.ini:
 +    paths:
 +      data: /var/lib/grafana/data
 +      logs: /var/log/grafana
 +      plugins: /var/lib/grafana/plugins
 +      provisioning: /etc/grafana/provisioning
 +    analytics:
 +      check_for_updates: true
 +    log:
 +      mode: console
 +      level: debug
 +    grafana_net:
 +      url: https://grafana.net
 +    server:
 +      root_url: "https://grafana.domain.local"
 +    auth.basic:
 +      enabled: false
 +      oauth_auto_login: true
 +      disable_login_form: true
 +    auth.generic_oauth:
 +      enabled: true
 +      tls_skip_verify_insecure: true
 +      name: keycloak
 +      allow_sign_up: true
 +      client_id: grafana
 +      client_secret: 12345678-123345678-12345678
 +      scopes: groups profile email
 +      #https://grafana.com/docs/grafana/latest/auth/generic-oauth/#jmespath-examples
 +      role_attribute_path: contains(groups[*], '/Grafana_Admin') && 'Admin' || contains(groups[*], '/Grafana_Editor') && 'Editor' || 'Viewer'
 +      auth_url: https://sso.domain.local/auth/realms/ad_realm/protocol/openid-connect/auth
 +      token_url: https://sso.domain.local/auth/realms/ad_realm/protocol/openid-connect/token
 +      api_url: https://sso.domain.local/auth/realms/ad_realm/protocol/openid-connect/userinfo
 +      signout_redirect_url: https://sso.domain.local/auth/realms/ad_realm/protocol/openid-connect/logout?redirect_uri=https://grafana.domain.local/login
 +
 +</code>
  • devops/deploy_prometheus_on_kubernetes_using_prometheus-operator.txt
  • Last modified: 2020/09/17 06:54
  • by admin