crossplane-runtime
crossplane-runtime copied to clipboard
ManagedReconciler could be used as a general purpose reconciler
What observation are you making?
The managed reconciler provides a rich set of functionalities and features that saves the developer from an extensive amount of boiler-plate code. In particular, the break-down of operations into 4 distinct categories could be extended to a lot of reconcilers, not necessarily the ones that are managing an external resource. I have personally found this pattern much more intuitive when writing new reconcilers (even when it's not managing an external cloud resource), as it provides a nice logical scaffolding for the resource reconciliation , and leaving the rest to be taken care of by the managed reconciler (e.g. deletion timestamp handling, status update, etc...).
Do you have any suggestions?
I suggest to remove the assumption that the library only can be used for external cloud resources. I think the current ExternalClient
interface could be generalized and renamed to something like ResourceDriver
, which provides the same interface. Some other limitations (for instance https://github.com/crossplane/crossplane-runtime/issues/101) could be also lifted.
I like this idea in principle, but it might be a a little difficult to implement. Presumably we do get some benefits from the managed reconciler logic assuming it's reconciling crossplane managed resources; i.e. expecting the resources being managed to have certain fields and satisfy a certain interface.
Perhaps it would be possible to nest these concerns? Something like managed.Reconciler
that extends a more generic resource.Reconciler
?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as stale
because it has had no activity in the last 90 days. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh
will mark this issue as not stale.