endpoint/mgr: don't register periodic regeneration if interval is 0#43790
Merged
gandro merged 1 commit intocilium:mainfrom Jan 15, 2026
Merged
Conversation
According to the documentation of the flag `endpoint-regen-interval`, the
periodic endpoint regeneration should only be configured if the interval
is bigger than `0`.
```
Periodically recalculate and re-apply endpoint configuration. Set to 0 to disable
```
But the current implementation has 2 issues.
* If the interval is configured as `0`, the regeneration is executed once at startup
* If the endpoint garbage collection is disabled, the periodic regeneration isn't
configured at all.
This commit fixes these two issues by splitting the controller registrations
and only apply them if their interval is bigger than `0`.
Note: Always executing the stop hook that removes the controllers isn't a problem.
Even if no controller would be registered.
Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
62689b7 to
b53347e
Compare
Member
Author
|
/test |
gandro
approved these changes
Jan 15, 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.
According to the documentation of the flag
endpoint-regen-interval, the periodic endpoint regeneration should only be configured if the interval is bigger than0.But the current implementation has 2 issues.
0, the regeneration at startup is still executed onceThis commit fixes these two issues by splitting the controller registrations and only apply them if their interval is bigger than
0.Note: Always executing the stop hook that removes the controllers isn't a problem. Even if no controller would be registered.
Fixes: #35815
"Precondition" for #43776