Hi Gyula,
Thanks for your quick response. Triggered by your thought around environment
variable-based reconciliation, we are now thinking that we could just have:
private static final String TRIGGER_FLINK_RESOURCE_RECONCILIATION =
System.getenv("TRIGGER_FLINK_RESOURCE_RECONCILIATION");
And
if (TRIGGER_RESOURCE_RECONCILIATION != null &&
"true".equalsIgnoreCase(TRIGGER_FLINK_RESOURCE_RECONCILE)) {
LOG.info("Triggering resource reconciliation due to environment
variable.");
updateControl = UpdateControl.updateResource(current);
}
And test.
WDYT? If you are ok with it - would you want a Flip or just a Jira? Happy for
your input on the environment variable name.
Kind regards, David.
From: [email protected] <[email protected]>
Date: Tuesday, 11 November 2025 at 04:59
To: [email protected] <[email protected]>
Cc: dev <[email protected]>
Subject: [EXTERNAL] Re: Proposal to add a new discovery plugin to the k8s
operator
Hey!
Thanks for the proposal.
In general I think it’s a good idea to expose a pluggable reconciler mechanism.
Maybe ForceReconciler is not a good name (not sure what is forceful about it :)
) probably simply FlinkResourceReconciler would do .
The questions in this particular case for the env variable based reconciliation
is whether this is something that we should support as a feature or not .
I think both of these would deserve their independent FLIP with the interfaces
and 1-2 example implementations to put them into context .
Cheers
Gyula
Sent from my iPhone
> On 10 Nov 2025, at 13:39, David Radley <[email protected]> wrote:
>
> 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
>
> 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
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