Hi,
We are opinionated about which Flink image we would like the Flink Kubernetes 
operator to use. So in the flink-kubenetes-operator  the ReconciliationUtils 
prior to [1] we are patching in code to trigger the update of the 
FlinkDeployment resource if needed with a new Flink image from an environment 
variable.

We would like to avoid needing to patch the code, so are thinking that the way 
to do this would be to have a new discover pattern to bring in our code from 
the plugins folder in a similar way to ListenerUtils[2], that would allow us to 
 force an update of the Flink Deployment with something like:


forceReconcilers= ReconciliationUtils.discoverForceReconcilers(configManager);


for ( ForceReconciler  forceReconciler: forceReconcilers) {

    If (forceReconciler.shouldForceUpdate(current)) {

           updateControl = UpdateControl.updateResource(current);

    }

}


Just before [1].

This would allow us to supply code as a plugin that would test our environment 
variable and see if we need to force an update of the deployment.

I am happy to code this ,
       Kind regards, David.

[1] 
https://github.com/apache/flink-kubernetes-operator/blob/eb99c5a12c6d93b9f303d8ac8d028ab28bb13689/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/ReconciliationUtils.java#L290
[2] 
https://github.com/apache/flink-kubernetes-operator/blob/eb99c5a12c6d93b9f303d8ac8d028ab28bb13689/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/listener/ListenerUtils.java#L69C53-L69C70

Kind regards, David.


Unless otherwise stated above:

IBM United Kingdom Limited
Registered in England and Wales with number 741598
Registered office: Building C, IBM Hursley Office, Hursley Park Road, 
Winchester, Hampshire SO21 2JN

Reply via email to