Skip to content

endpoint/mgr: don't register periodic regeneration if interval is 0#43790

Merged
gandro merged 1 commit intocilium:mainfrom
mhofstetter:pr/mhofstetter/epmgr-periodic-regeneration-condition
Jan 15, 2026
Merged

endpoint/mgr: don't register periodic regeneration if interval is 0#43790
gandro merged 1 commit intocilium:mainfrom
mhofstetter:pr/mhofstetter/epmgr-periodic-regeneration-condition

Conversation

@mhofstetter
Copy link
Copy Markdown
Member

@mhofstetter mhofstetter commented Jan 15, 2026

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 at startup is still executed once
  • 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.

Fixes: #35815
"Precondition" for #43776

@mhofstetter mhofstetter added kind/bug This is a bug in the Cilium logic. release-note/bug This PR fixes an issue in a previous release of Cilium. labels Jan 15, 2026
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>
@mhofstetter mhofstetter force-pushed the pr/mhofstetter/epmgr-periodic-regeneration-condition branch from 62689b7 to b53347e Compare January 15, 2026 12:20
@mhofstetter
Copy link
Copy Markdown
Member Author

/test

@mhofstetter mhofstetter changed the title endpoint/mgr: only register periodic regeneration if interval is not 0 endpoint/mgr: don't register periodic regeneration if interval is 0 Jan 15, 2026
@mhofstetter mhofstetter marked this pull request as ready for review January 15, 2026 12:50
@mhofstetter mhofstetter requested a review from a team as a code owner January 15, 2026 12:50
@mhofstetter mhofstetter added the needs-backport/1.19 This PR / issue needs backporting to the v1.19 branch label Jan 15, 2026
@mhofstetter mhofstetter removed the request for review from jrajahalme January 15, 2026 15:11
@mhofstetter mhofstetter added dont-merge/bad-bot To prevent MLH from marking ready-to-merge. and removed dont-merge/bad-bot To prevent MLH from marking ready-to-merge. labels Jan 15, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 15, 2026
@gandro gandro added this pull request to the merge queue Jan 15, 2026
Merged via the queue into cilium:main with commit d3ad556 Jan 15, 2026
82 of 84 checks passed
@mhofstetter mhofstetter deleted the pr/mhofstetter/epmgr-periodic-regeneration-condition branch January 15, 2026 15:27
@giorio94 giorio94 mentioned this pull request Jan 19, 2026
8 tasks
@giorio94 giorio94 added backport-pending/1.19 The backport for Cilium 1.19.x for this PR is in progress. and removed needs-backport/1.19 This PR / issue needs backporting to the v1.19 branch labels Jan 19, 2026
@github-actions github-actions bot added backport-done/1.19 The backport for Cilium 1.19.x for this PR is done. and removed backport-pending/1.19 The backport for Cilium 1.19.x for this PR is in progress. labels Jan 19, 2026
@cilium-release-bot cilium-release-bot bot moved this to Released in cilium v1.19.0 Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-done/1.19 The backport for Cilium 1.19.x for this PR is done. kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.

Projects

No open projects
Status: Released

Development

Successfully merging this pull request may close these issues.

4 participants