Repository navigation
[probes.sched] Added custom interval for RDS discovery call - #1255
Merged
manugarg merged 8 commits intoApr 9, 2026
Merged
Conversation
manugarg
reviewed
Mar 16, 2026
manugarg
left a comment
Contributor
There was a problem hiding this comment.
Added a couple of comments. Can you also add unit tests for these changes please.
Contributor
Author
|
@manugarg Please let me know if these changes look good and if you can approve the workflow so the tests can run, that would be great. |
manugarg
reviewed
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new
targets_update_secfield to theProbeDefproto, allowing users to configure how often the probe scheduler re-evaluates its target list on a per-probe basis.Currently Cloudprober's probe scheduler re-evaluates (discovers) targets on a fixed 1-minute interval. For dynamic infrastructure — such as RDS-discovered targets in environments where instances spin up and down frequently — this default is too slow to detect changes promptly. There was no way to configure this interval per-probe, forcing users to either tolerate stale target lists or work around it at a higher level.
Changes:
optional int32 targets_update_sec = 103toProbeDef.targets_update_secfrom the probe config and setsTargetsUpdateIntervalinOptions.TargetsUpdateIntervalfrom options when initializing the scheduler, overriding the default before the existing floor check against the probe interval.Example config
The existing behavior is preserved — if
targets_update_secis not set, the scheduler continues to default to 1 minute, and the floor ofmax(targets_update_sec, probe_interval)is still enforced.