Hello,
I am running prometheus in Kubernetes using prometheus helm chart.
One of my targets require basic authentication in the for of an api key for "username" and an api secret for "password.
I have created them as a kubernetes secret and in the helm values in the env: section i have
- name: BASIC_USER
valueFrom:
secretKeyRef:
name: basic-auth
key: username
- name: BASIC_PW
valueFrom:
secretKeyRef:
name: basic-auth
key: password
When exec in to the pod and doing a printenv i can see that the vars are present, echo'ing them out also gives the expected values.
Now comes my challenge, my scrape job requires authentication, and i am trying to reference the variables like so:
basic_auth:
username: $BASIC_USER
password: $BASIC_PW
But for the life of me, i cant seem to get prometheus to pick it up in the scrape job.
Am i missing the obvious?
If it matters, i am scraping confluent cloud metrics.
Best regards
Christian Oelsner