Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

WithConfig docs suggests to use stash to pass in rest.Config but stash doesnt exist in SetupWithManager #316

Open
gmrodgers opened this issue Nov 22, 2022 · 1 comment

Comments

@gmrodgers
Copy link
Contributor

The README suggests that one should form the rest.Config in a previous SyncReconciler, stash it and pass it through to the WithConfig SubReconciler. But when accessing that stash, it always panics for me. I debugged it and it panics in the WithConfig.SetupWithManager which I believe does not have the stash set up yet for accessing in the ctx.

Am I missing a trick here?

@scothis
Copy link
Contributor

scothis commented Apr 19, 2023

Sorry for the lag. I really should have labeled the WithConfig reconciler as experimental. Proper cross-cluster reconciliation has a lot of nuances that are not captured well. Can you expand a bit on your use case?

The Setup method in particular can get tricky as most of what you're setting up is informers and indexes that are for the host cluster. I'm tempted to nil out the builder rather than passing it though. For example, nesting a ChildReconciler under WithConfig can cause issues as the informers will target the original cluster.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants