You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
Something we have done a bunch of times using regular controller-runtime tooling is to setup watches for resources that arn't known about upfront. For example, we might have a CRD that allows for a resource GVK to be defined in the spec, so someone creates a CR configured for the RMQ resource and our controller will inspect that, perhaps create some RMQ resources and want to watch for changes.
It looks like the Tracker object can setup watches dynamically but only if the type is known upfront, as it stands requires a bldr.Watch call in the Setup of the Reconciler, is that correct?
Cheers,
Sam
The text was updated successfully, but these errors were encountered:
If that PR fits your needs, we can work to get it merged. The main open issue at the moment is that when we start tracking a new resource, we start an informer which is never stoped until the process terminates. If the set of kinds being watched is stable this isn't an issue, but it can cause additional memory to be consumed to maintain informer caches for resources that aren't actually doing anything.
Yes, that PR would fit the use case I'm describing. We have some existing components that fit this pattern, so we're not in any sort of hurry - but it would be a useful feature for us writing new reconcilers in the future.
For us, the set of Kinds are fairly dynamic. New CRDs are created at runtime, and watched by our components - however we're not really that concerned with optimisation right now, so if there was a memory leak of informer cache it wouldn't stop us adopting the feature.
Hey Scott,
Something we have done a bunch of times using regular controller-runtime tooling is to setup watches for resources that arn't known about upfront. For example, we might have a CRD that allows for a resource GVK to be defined in the spec, so someone creates a CR configured for the RMQ resource and our controller will inspect that, perhaps create some RMQ resources and want to watch for changes.
It looks like the Tracker object can setup watches dynamically but only if the type is known upfront, as it stands requires a bldr.Watch call in the Setup of the Reconciler, is that correct?
Cheers,
Sam
The text was updated successfully, but these errors were encountered: