Repository navigation
Conversation
Sync controllers are created unmanaged, so the manager's controller configuration does not apply and controller-runtime always falls back to its 2m default CacheSyncTimeout. On startup, the informers for a PublishedResource with many objects (tens of thousands, or large ones) may need longer than that to sync, which makes the sync controller fail to start. Add a --cache-sync-timeout flag and pass it through to the options of each per-PublishedResource sync controller. The default stays at 2m, so the behaviour does not change unless the flag is set. on-behalf-of: @eon-se opensource@eon.com Signed-off-by: Mark Altmann <mark.altmann.external@eon.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @Wompipomp. Thanks for your PR. I'm waiting for a kcp-dev member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Summary
Sync controllers are created unmanaged, so the manager's controller configuration does not apply
and controller-runtime always uses its 2m default
CacheSyncTimeout. On startup, the informer for thelocal
Kindsource of a PublishedResource with many (or large) objects can need longer than that, and the synccontroller then fails to start with a cache sync timeout.
This adds a
--cache-sync-timeoutflag that is passed through to the options of everyper-PublishedResource sync controller. The default stays at 2m, so behaviour only changes when the
flag is set. Non-positive values are rejected. Tested with
go test -race ./...,make lintandmake test-e2e(kcp 0.32).We run this with
--cache-sync-timeout=5mfor a PublishedResource with ~10,000 objects on theservice cluster; since then all sync controllers start after agent restarts. This complements
restarting failed controllers (#201): the retry recovers a controller after the timeout, the flag
avoids the failed first attempt.
Note: #201 and #205 touch the same struct and
Add()in the sync manager (#205 alsothe flag plumbing in
options.go/main.go); the overlap is trivial, and if either lands first,I will rebase this PR.
What Type of PR Is This?
/kind feature
Related Issue(s)
Fixes #207
Release Notes