helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

Support secrets for servicemonitor in app-template

Open runningman84 opened this issue 11 months ago • 3 comments

Details

Describe the solution you'd like:

I would like to set these options for the serviceMonitor object:

BasicAuth bearerTokenFile bearerTokenSecret

Anything else you would like to add:

This allows us to access things like the homeassistant api which needs a bearerTokenFile for auth.

Additional Information:

runningman84 avatar Mar 16 '24 12:03 runningman84

Hi! Sorry it took me a while to get back to you on this. I was just starting work to try and implement this, but as far as I am able to tell from the docs, these fields are not supported on the serviceMonitor resource? -

  • https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#servicemonitorspec
  • https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#basicauth

bjw-s avatar Mar 27 '24 14:03 bjw-s

hmm how did the old chart work in that case? https://github.com/k8s-at-home/charts/blob/master/charts/stable/home-assistant/templates/servicemonitor.yaml

runningman84 avatar Mar 28 '24 10:03 runningman84

Ooohhh, it's on the endpoints... I was looking in the wrong place. The endpoints are passed through 1:1 into the serviceMonitor, so you should be able to set those values as you need them

bjw-s avatar Mar 28 '24 11:03 bjw-s