Aitozi created FLINK-26915:
------------------------------

             Summary: Extend the Reconciler and Observer interface
                 Key: FLINK-26915
                 URL: https://issues.apache.org/jira/browse/FLINK-26915
             Project: Flink
          Issue Type: Improvement
          Components: Kubernetes Operator
            Reporter: Aitozi
             Fix For: kubernetes-operator-1.0.0


As discussed in 
[comments|https://github.com/apache/flink-kubernetes-operator/pull/112#discussion_r835762111],
 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:

{{}}
{code:java}

{code}
{{public interface Reconciler<CR, CTX extends ReconcilerContext<CR>> \{     
UpdateControl<CR> reconcile(CR cr, CTX context) throws Exception;     
DeleteControl cleanup(CR cr, CTX ctx);
} }}

{{}}

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to