reconciler-runtime
reconciler-runtime copied to clipboard
WithConfig docs suggests to use stash to pass in rest.Config but stash doesnt exist in SetupWithManager
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?
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.