amazon-web-serviceskubernetes-helmkubernetes-secretsprometheus-blackbox-exporterhelm-tls

Substitute password in helm values file prometheus blackbox exporter http target


I'm trying to do an aliveness-check to rabbitmq management console via http api. I have the target in the helm values file under endpoints; I'm using http probe.

endpoints:
    - module: rabbit_alive_check
      port: http
      scheme: http
      url: "http://username:password@nodeip:15672/api/aliveness-test/%2F"

The output comes as expected. But I'm looking to substitute the password which I've already encrypted in helm secrets and not have it hardcoded in the url. I adopted prometheus-blackbox exporter from https://github.com/helm/charts/tree/master/stable/prometheus-blackbox-exporter.

How to call the password from helm secrets.yaml?


Solution

  • You cannot inject secret value into values.yaml, since values.yaml is actually the input for your Helm Chart and it does not use any substitution.

    I'm not sure where the code excerpt comes from, but a possible workaround for health checks could be having a custom script.