Allow passing authorization field to the scrape jobs
Context
This is required for properly defining scrape jobs in the MicroK8s charm, otherwise the bearer token gets dropped and the metrics endpoints cannot be scraped.
Testing Instructions
Pass a scrape job with a set authorization field. Did not see any existing unit tests for scrape job sanitization, so I did not go through the effort to add one.
Release Notes
Add authorization in the allowlist for scrape jobs configuration
Issue
Scrape jobs that require a bearer token for authorization must provide it via the
authorization
configuration field, see https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_configSolution
Allow passing
authorization
field to the scrape jobsContext
This is required for properly defining scrape jobs in the MicroK8s charm, otherwise the bearer token gets dropped and the metrics endpoints cannot be scraped.
Testing Instructions
Pass a scrape job with a set
authorization
field. Did not see any existing unit tests for scrape job sanitization, so I did not go through the effort to add one.Release Notes
Add authorization in the allowlist for scrape jobs configuration