0

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?

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
karthick
  • 57
  • 1
  • 2
  • 6

1 Answers1

0

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.

Rafał Leszko
  • 4,939
  • 10
  • 19
  • Is there a way I can add it to templates so it can pick? – karthick Jan 09 '20 at 13:48
  • As always with secrets you can either inject it as env variable or mount as a volume. Also, obviously, you can use Kubernetes API to fetch it. Saying that, there is nothing like automatic resolution to the template files. – Rafał Leszko Jan 09 '20 at 14:04