kubernetes 如何在Grafana helm chart中配置自定义LDAP?

2fjabf4q  于 2023-01-12  发布在  Kubernetes
关注(0)|答案(1)|浏览(132)

我是Kubernetes and Helm的新手,尝试用我自己的LDAP定制stable/grafana Helm图表(https://github.com/helm/charts/tree/master/stable/grafana)。grafana.iniauth.ldap部分和图表的values.yaml文件的ldap部分有什么区别?我如何配置LDAP主机地址和凭据?

qvsjd97n

qvsjd97n1#

要在Grafana上启用LDAP配置,您需要更新这两个部分。
在values.yaml中,有两个部分 grafana.inildap。要启用LDAP,您需要更新这两个部分。请检查以下内容:
第一个 grafana.ini

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
  grafana_net:
    url: https://grafana.net
## LDAP Authentication can be enabled with the following values on grafana.ini
## NOTE: Grafana will fail to start if the value for ldap.toml is invalid
   auth.ldap:
     enabled: true
     allow_sign_up: true
     config_file: /etc/grafana/ldap.toml

在grafana.ini部分,首先将auth.ldap设置为true,并将配置文件指定为ldap.toml
其次,ldap

## Grafana's LDAP configuration
## Templated by the template in _helpers.tpl
## NOTE: To enable the grafana.ini must be configured with auth.ldap.enabled
ldap:
  enabled: true
  # `existingSecret` is a reference to an existing secret containing the ldap configuration
  # for Grafana in a key `ldap-toml`.
  existingSecret: ""
  # `config` is the content of `ldap.toml` that will be stored in the created secret
   config: |-
     verbose_logging = true

     [[servers]]
     host = "my-ldap-server"
     port = 636
     use_ssl = true
     start_tls = false
     ssl_skip_verify = false
     bind_dn = "uid=%s,ou=users,dc=myorg,dc=com"

在本部分中,helm使用LDAP配置准备ldap.toml文件,这在第一步中指定。
因此,根据配置更新LDAP主机、端口、bind_dn。

相关问题