Skip to content

feat: optimize event handler#7766

Merged
simonpasquier merged 1 commit intoprometheus-operator:mainfrom
simonpasquier:optimize-event-handler
Aug 5, 2025
Merged

feat: optimize event handler#7766
simonpasquier merged 1 commit intoprometheus-operator:mainfrom
simonpasquier:optimize-event-handler

Conversation

@simonpasquier
Copy link
Contributor

@simonpasquier simonpasquier commented Aug 1, 2025

Description

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.

If it fixes an existing issue (bug or feature), use the following keyword:

Closes: #ISSUE-NUMBER

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

Please check the Prometheus-Operator testing guidelines for recommendations about automated tests.

Changelog entry

Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.


This commit improves the efficiency of event handlers on configuration
resources. In practice, the operator only triggers a reconciliation when
there's a change in the resource's generation or labels. It's a
pre-requisite to implement the status subresource for this type of
resources.

For secrets and configmaps, the operator still relies on the resource
version.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@simonpasquier simonpasquier force-pushed the optimize-event-handler branch from 5e4e590 to 9ef0a71 Compare August 4, 2025 08:41
@simonpasquier simonpasquier marked this pull request as ready for review August 4, 2025 08:41
@simonpasquier simonpasquier requested a review from a team as a code owner August 4, 2025 08:41
Copy link
Contributor

@slashpai slashpai left a comment

Choose a reason for hiding this comment

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

Excellent performance optimisation 💯

@simonpasquier simonpasquier merged commit 283578b into prometheus-operator:main Aug 5, 2025
23 checks passed
@simonpasquier simonpasquier deleted the optimize-event-handler branch August 5, 2025 07:55
@slashpai slashpai mentioned this pull request Aug 21, 2025
5 tasks
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.

2 participants