Skip to content

Conversation

@teekennedy
Copy link

Description

Adds support for the webhook_url_file option in discord_server alertmanager configuration.

In v0.28.0, alertmanager added support for webhook_url_file option in discord_config. This PR adds the option to the alertmanagerconfigs CRD, along with the appropriate validation and documentation.

Fixes #7159

Type of change

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Verification

I've added unit tests for the new validation code paths, and verified that existing tests pass. I did not setup a dev environment to be able to run e2e tests, but I did test this new configuration option on my homelab k8s cluster and it's working there.

Changelog entry

Add support for the webhook_url_file option in discord_server alertmanager configuration CRD.

…ver config

In v0.28.0, alertmanager added support for webhook_url_file option in
discord_config. This PR adds the option to the alertmanagerconfigs-crd,
along with the appropriate validation and documentation.

Fixes prometheus-operator#7159
@teekennedy teekennedy requested a review from a team as a code owner October 15, 2025 20:03
@teekennedy
Copy link
Author

I made these changes before I knew about the existing effort in #6346. If I had known I would have worked to get the changes in that PR rebased instead of starting from scratch, but here we are.

@heliapb
Copy link
Member

heliapb commented Oct 16, 2025

hi @teekennedy you can always add dongjiang1989 #6346, and we can try to work on reviewing

@teekennedy
Copy link
Author

@dongjiang1989 would you mind taking a look at this PR when you have a chance? Your input would be appreciated given your work on a similar PR.

APIURL *v1.SecretKeySelector `json:"apiURL,omitempty"`
// webhookURLFile defines the file to read the Discord webhook URL from.
// It is mutually exclusive with `apiURL`.
// Either `apiURL` or `webhookURLFile` is required.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Either `apiURL` or `webhookURLFile` is required.
// Either `apiURL` or `webhookURLFile` is required.
// It requires Alertmanager >= 0.28.0.

@dongjiang1989
Copy link
Member

@teekennedy Maybe some security problem
#6346 (comment) from @simonpasquier

@metalmatze
Copy link
Member

It'd be lovely to get this in! We're currently templating the kube-prometheus with the webhook URL directly 😬
Thank you all for working on this! 👏

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.

Missed webhook_url_file option for receivers discord_config

4 participants