Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
Description
As discussed in comments, I proposed make two changes to the Reconciler and Observer
- directly return the UpdateControl from the reconciler, because the reconciler can in charge of the Update behavior, By this, we dont have to infer the update control in the controller
- Make the params generic and extends from the ReconcilerContext and ObserverContext. which will be easy for different controller to ship their own objects for reconcile and observer. For example, in the FlinkSessionJob case, we need to get the effective config from the FlinkDeployment first and also pass the FlinkDeployment to the reconciler.
After the change, the reconciler will look like this:
public interface Reconciler<CR, CTX extends ReconcilerContext<CR>> { UpdateControl<CR> reconcile(CR cr, CTX context) throws Exception; DeleteControl cleanup(CR cr, CTX ctx); }