Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants