Hi Matthias,
In that config, there are only two "role: service" sections. One is the pushgateway, and the other forces use of the blackbox app, which seems like it shouldn't be necessary for what I'm trying to do.
I added a scrape config, which seems to have done the trick:
- honor_labels: true
job_name: prometheus-service-non-blackbox
kubernetes_sd_configs:
- role: service
relabel_configs:
- action: keep
regex: service
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scrape
- action: replace
regex: (.+)
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_path
target_label: __metrics_path__
Then I just set the service annotation:
Now my prometheus correctly has 1 target for the service, and no targets for the endpoints.
Thanks for your help!
- Patrick