apiextension/definition: don't attempt to start composite controllers multiple times#5437
Conversation
…ontrollers Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@upbound.io>
…rceInformers everywhere Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@upbound.io>
|
@sttts Can you provide more detail on the motivation please. Isn't Edit: Also, I'm still waking up so maybe missing something obvious but it doesn't look like this PR currently touches any starting code. Only stopping code. 🤔 |
|
In realtime composition mode we are registering the XR cache in order to manage composite informers referenced by these XRs. That part is not idem-potent. Previsouly every run through the definition reconciler without starting a new controller was replacing these XR caches with unstarted ones.
There is an early return added in case the controller is running. |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-1.15
git worktree add -d .worktree/backport-5437-to-release-1.15 origin/release-1.15
cd .worktree/backport-5437-to-release-1.15
git switch --create backport-5437-to-release-1.15
git cherry-pick -x 947c76f0f8fee1651ed73265b17927ceb992649c 1c949ed056ef03652a273c1cdf5316446688015c |
Description of your changes
The old code depended on controller engine's idem-potency of
Run(...). This PR makes this logic explicit in the XRD reconciler, skipping everything around controller start too.Fixes parts of #5400, more is coming in #5422.
I have:
make reviewableto ensure this PR is ready for review.[ ] Added or updated e2e tests.[ ] Linked a PR or a docs tracking issue to document this change.[ ] Addedbackport release-x.ylabels to auto-backport this PR.Need help with this checklist? See the cheat sheet.