admin管理员组

文章数量:1290942

This is regarding prometheus blackbox_exporter. I want to extract username and password value form Kubernetes secret. In order to achieve that, I added extraSecretMounts section in my value.yaml for helm chart; I also verified the keys under the mounthPath inside pod and can see that variables/values are available under /etc/prometheus/secret.

However, when I am testing the endpoint wget -qO- "http://localhost:9115/probe?target=;module=http_2xx_esb&debug=true" . I get an authentication error.

Can someone please assist me with Configuration I am missing.

# Secret Mount for credentials
extraSecretMounts:
  - name: credentials-secret
    mountPath: /etc/prometheus/secret
    secretName: my_secret
    readOnly: true
    defaultMode: 420
http_2xx:
      prober: http
      timeout: 2s
      http:
        valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
        follow_redirects: true
        preferred_ip_protocol: "ip4"
        tls_config:
          insecure_skip_verify: false          
        basic_auth:
          username: "$(my_username)"
          password: "$(my_password)"

Thanks in advance!

本文标签: How to use Kubernetes secret under valueyaml for prometheus blackboxexporterStack Overflow