【问题标题】:How to configure custom LDAP in Grafana helm chart?如何在 Grafana helm 图表中配置自定义 LDAP?
【发布时间】:2020-03-28 09:07:31
【问题描述】:

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

【问题讨论】:

    标签: kubernetes ldap grafana kubernetes-helm


    【解决方案1】:

    在 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。

    【讨论】:

    • 我是 Grafana 设置的新手,并试图了解如何将秘密数据用于“bind_password”和其他敏感数据,以便在安装过程中在 ldap-toml 密钥中设置属性,有什么线索,因为我不清楚吗?
    • 试过这个配置,我看到的只是 Grafana 容器的 /etc/grafana/ldap.toml 文件中开箱即用的 LDAP 部分,而不是配置中给出的:|- values.xml 的部分,任何线索?
    • 注意yaml最差,grafana.inigrafana: \n init不一样
    猜你喜欢
    • 2019-12-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-15
    • 1970-01-01
    • 2021-02-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多