Skip to content

Feat: Add Validations to Slack Receiver in Alertmanager Config CR#8235

Merged
simonpasquier merged 9 commits intoprometheus-operator:mainfrom
nutmos:feat/add-slack-validations
Jan 7, 2026
Merged

Feat: Add Validations to Slack Receiver in Alertmanager Config CR#8235
simonpasquier merged 9 commits intoprometheus-operator:mainfrom
nutmos:feat/add-slack-validations

Conversation

@nutmos
Copy link
Contributor

@nutmos nutmos commented Jan 2, 2026

Description

This PR adds validations to Slack Receiver in Alertmanager Config CR

  1. Change from string to *URL type for the URL parameters
  2. Add MinLength=1 validation for optional string parameters
  3. Change from string to *string for optional string parameters
  4. Add MinItems=1 for slice parameters

Type of change

What type of changes does your code introduce to the Prometheus operator? Put an x in the box that apply.

  • 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

Unit Testing

Changelog entry

- Add validations to Slack Receiver in Alertmanager Config CR

for add more validatios
@nutmos nutmos requested a review from a team as a code owner January 2, 2026 11:36
to match the var type
@nutmos
Copy link
Contributor Author

nutmos commented Jan 3, 2026

Move to draft and wait for #8211 to merge first.

@nutmos nutmos marked this pull request as draft January 3, 2026 03:24
nutmos added 3 commits January 3, 2026 17:36
to cover more case of URL validattion
to fix the pointer deref issue
@nutmos nutmos marked this pull request as ready for review January 5, 2026 13:17
nutmos added 2 commits January 5, 2026 21:20
to show the correct variable
to resolve merge conflict
@heliapb
Copy link
Member

heliapb commented Jan 6, 2026

Hi @nutmos could you please check the conflicts, thanks

nutmos added 2 commits January 7, 2026 07:56
to resolve merge conflict
to resolve merge conflict
Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

Thanks!

@simonpasquier simonpasquier merged commit 37ac74f into prometheus-operator:main Jan 7, 2026
22 checks passed
Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

I'm currently checking if we have other PRs that we'd need to revert...

wrong PR

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.

3 participants