Is it possible to proxy `ScrapeConfig` targets?

117 Views Asked by At

I discovered Prometheus Operator ScrapeConfig CRD.

I have a working Prometheus deployment that requires a proxy to generate ID tokens to authenticate requests to an external (Google Cloud Run) service. The token must have a per-target audience:

- job_name: foo
  scheme: http
  proxy_url: http://proxy:7777
  http_sd_configs:
  - refresh_interval: 1m
    url: http://service-discovery:8080

In this case, the Service Discovery endpoint is not authenticated but targets described by the endpoint must be authenticated.

Prometheus provides only limited auth options and the use of a proxy provides a general-purpose solution.

I'm porting the solution to Kubernetes but it appears that it's not possible to configure ScrapeConfig to proxy its requests (neither to the Service Discovery endpoint not to the resulting targets).

Is this true?

1

There are 1 best solutions below

0
DazWilkin On