Migrating from v2 to v3
Version 3 introduces some breaking changes to APIs, however the migration to these changes should be trivial.
Reconciler
Reconcilercan throw checked exception (not just runtime exception), and that also can be handled byErrorStatusHandler.cleanupmethod is extracted from theReconcilerinterface to a separateCleanerinterface. Finalizers only makes sense that theCleanupis implemented, from now finalizer is only added if theReconcilerimplements this interface (or has managed dependent resources implementingDeleterinterface, see dependent resource docs).Contextobject ofReconcilernow takes the Primary resource as parametrized type:Context<MyCustomResource>.ErrorStatusHandlerresult changed, it functionally has been extended to now prevent Exception to be retried and handles checked exceptions as mentioned above.
Event Sources
- Event Sources are now registered with a name. But utility method is available to make it easy to migrate to a default name.
- InformerEventSource
constructor changed to reflect additional functionality in a non backwards compatible way. All the configuration
options from the constructor where moved to
InformerConfiguration. See sample usage inWebPageReconciler. PrimaryResourcesRetrieverwas renamed toSecondaryToPrimaryMapperAssociatedSecondaryResourceIdentifierwas renamed toPrimaryToSecondaryMappergetAssociatedResourceis now renamed to getgetSecondaryResourcein multiple places
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.