Skip to content

AlertmanagerConfig: add support for httpHeaders in httpConfig#8353

Open
anshul23102 wants to merge 2 commits intoprometheus-operator:mainfrom
anshul23102:alertmanager-http-headers
Open

AlertmanagerConfig: add support for httpHeaders in httpConfig#8353
anshul23102 wants to merge 2 commits intoprometheus-operator:mainfrom
anshul23102:alertmanager-http-headers

Conversation

@anshul23102
Copy link

Description

This PR adds support for configuring custom HTTP headers via httpHeaders in
httpConfig for AlertmanagerConfig.

Upstream Prometheus Alertmanager supports setting arbitrary HTTP headers
(such as X-API-Key) through the http_headers field in http_config for
webhooks and other HTTP-based receivers. However, the Prometheus Operator
AlertmanagerConfig CRD did not expose this functionality, making it
impossible to use header-based authentication mechanisms when managing
Alertmanager through the operator.

This change introduces first-class support for custom HTTP headers in the
AlertmanagerConfig CRD, bringing it closer to parity with upstream
Alertmanager and enabling common real-world use cases such as API key–based
authentication for webhook receivers.

Closes: #8341

If you're contributing for the first-time, check our contribution guidelines.

Type of change

  • CHANGE
  • FEATURE
  • BUGFIX
  • ENHANCEMENT
  • NONE

Verification

  • Ran unit tests locally (make test).
  • Regenerated CRDs and API reference documentation (make generate, make manifests).
  • Verified that custom HTTP headers are propagated into the generated
    Alertmanager configuration via updated golden file tests.

Changelog entry

Add support for configuring custom HTTP headers in AlertmanagerConfig httpConfig.

@anshul23102 anshul23102 requested a review from a team as a code owner February 3, 2026 05:04
@heliapb
Copy link
Member

heliapb commented Feb 3, 2026

Hi @anshul23102 as was discussed on the issue the ideia is to split the work into some parts
#8341 (comment), since makes it a lot easier to review by the team.

As I manifested on the issue the intention of pick the first change related to pkg/alertmanager/types.go, could you maybe work on the next phase as described in the issue. Also ideally manifest your interest in pick up the work on the existing issue, to avoid duplicating the efforts. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AlertmanagerConfig does not support http_headers in webhook_configs (missing support for custom HTTP headers)

2 participants