Skip to content

Conversation

bohub12
Copy link
Contributor

@bohub12 bohub12 commented Jul 27, 2025

Description:

I've added a new CollectorTargetReloadInterval option that allows configuring how often the Prometheus receiver reloads targets from the target allocator.

Link to tracking Issue(s):

Testing:

I've verified in a local Kubernetes cluster that:

  • Embedded TargetAllocator
    • If not specified, collectorTargetReloadInterval is 30s (default)
    • If specified, collectorTargetReloadInterval uses the custom value
  • TargetAllocator CRD
    • If not specified, collectorTargetReloadInterval is 30s (default)
    • If specified, collectorTargetReloadInterval uses the custom value

@bohub12 bohub12 requested a review from a team as a code owner July 27, 2025 20:19
Copy link
Contributor

@swiatekm swiatekm left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution!

I think you might be overcomplicating this change a bit. You're adding a setting that changes collector behavior, but which happens to be part of a config block the operator generates automatically. It's enough for this setting to be in the Collector CRD, there's no reason to change the TargetAllocator CRD. Does that make sense?

@bohub12 bohub12 force-pushed the feature/add-collector-target-reload-interval branch from dd1d2a6 to ab9988c Compare August 1, 2025 17:40
@bohub12
Copy link
Contributor Author

bohub12 commented Aug 1, 2025

Thanks for the quick review! 👍

I agree with your suggestion to provide collectorTargetReloadInterval only in the Collector CRD. So I added the option only to the Collector CRD as you mentioned. If there's anything in the code that needs to be fixed, feel free to let me know.

@bohub12 bohub12 requested a review from swiatekm August 1, 2025 18:03
@bohub12 bohub12 force-pushed the feature/add-collector-target-reload-interval branch from ab9988c to 51aee6d Compare August 22, 2025 06:11
@bohub12
Copy link
Contributor Author

bohub12 commented Aug 22, 2025

Hello, @swiatekm! Since some time has passed after I opened the PR, a conflict occurred with the main branch, so I resolved it by rebasing and have committed the changes. Please review it when you get a chance! 😄 Thank you

@swiatekm
Copy link
Contributor

@bohub12 your change looks good to me. Could you rebase on main and run make update to get rid of the conflicts in generated files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support configuring "target reload interval" via CRD
2 participants