Repository navigation
Method Reconciler#reconcile is not triggered when resource is deleted. #3621
Description
Bug Report
I wanted to create metric exporter for certain resource type.
For this I implemented Reconciler with triggerReconcilerOnAllEvents enabled (introducerd in JOSDK 5.2) to receive all events (create, update and delete).
Method Reconciler#reconcile is not triggered when resource is deleted.
What did you do?
@ControllerConfiguration(triggerReconcilerOnAllEvents = true, generationAwareEventProcessing = false)
public class MyResourceReconciler implements Reconciler<MyResource>{
private static final Logger LOG = Logger.getLogger(MyResourceReconciler.class);
@Override
public UpdateControl<MyResource> reconcile(MyResource resource, Context<MyResource> context) throws Exception {
LOG.infof("Resource %s/%s event", resource.getMetadata().getNamespace(), resource.getMetadata().getName());
if(context.isPrimaryResourceDeleted()){
LOG.infof("deleted");
return UpdateControl.noUpdate();
}
LOG.infof("created/updated");
return UpdateControl.noUpdate();
}
}
What did you expect to see?
When I create, update and delete resource I expected to see in logs:
INFO [com.test.MyResourceReconciler] (ReconcilerExecutor-myresourcereconciler-92) Resource mynamespace/myresource event
INFO [com.test.MyResourceReconciler] (ReconcilerExecutor-myresourcereconciler-92) created/updated
INFO [com.test.MyResourceReconciler] (ReconcilerExecutor-myresourcereconciler-93) Resource mynamespace/myresource event
INFO [com.test.MyResourceReconciler] (ReconcilerExecutor-myresourcereconciler-93) created/updated
INFO [com.test.MyResourceReconciler] (ReconcilerExecutor-myresourcereconciler-93) Resource mynamespace/myresource event
INFO [com.test.MyResourceReconciler] (ReconcilerExecutor-myresourcereconciler-93) deleted
What did you see instead? Under which circumstances?
When I create, update and delete resource I see in logs:
INFO [com.test.MyResourceReconciler] (ReconcilerExecutor-myresourcereconciler-92) Resource mynamespace/myresource event
INFO [com.test.MyResourceReconciler] (ReconcilerExecutor-myresourcereconciler-92) created/updated
INFO [com.test.MyResourceReconciler] (ReconcilerExecutor-myresourcereconciler-93) Resource mynamespace/myresource event
INFO [com.test.MyResourceReconciler] (ReconcilerExecutor-myresourcereconciler-93) created/updated
Environment
Kubernetes cluster type:
OpenShift 4.19.43
$ Mention java-operator-sdk version from pom.xml file
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus.platform</groupId>
<artifactId>quarkus-bom</artifactId>
<version>3.39.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkus.platform</groupId>
<artifactId>quarkus-operator-sdk-bom</artifactId>
<version>3.39.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependency>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk</artifactId>
</dependency>
resolves to: io.javaoperatorsdk:operator-framework-core:5.5.0
$ java -version
openjdk version "25.0.4.1" 2026-08-18 LTS
OpenJDK Runtime Environment Temurin-25.0.4.1+1 (build 25.0.4.1+1-LTS)
OpenJDK 64-Bit Server VM Temurin-25.0.4.1+1 (build 25.0.4.1+1-LTS, mixed mode, sharing)
$ kubectl version
Client Version: 4.19.0-202608112108.p2.gb2a93a6.assembly.stream.el9-b2a93a6
Kustomize Version: v5.5.0
Kubernetes Version: v1.32.13
Additional context
- resources does not have finalizers
- adding defaultFilters = false to ControllerConfiguration did not helped
Activity
csviri commentedon Sep 17, 2026
@nevenr thx for reporting we will take a look. Please use the latest version of the framework if possible.
csviri commentedon Sep 17, 2026
Note that we have an integration test for this:
java-operator-sdk/operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/triggerallevent/eventing/TriggerReconcilerOnAllEventIT.java
Lines 81 to 98 in 748f3a3
Could you pls provide a simple reproducer?
csviri commentedon Sep 17, 2026
added this small fix for deprecated flag, but this does not seems to be your case: #3622
nevenr commentedon Sep 17, 2026
Hi,
Please find reproducer: https://github.com/nevenr/java-operator-sdk-reproducer-3621
Regards,
N.
csviri commentedon Sep 18, 2026
@metacosm @xstefank could you take this one please, I suspect that there will some something we the Quarkus configurations
csviri commentedon Sep 21, 2026
@nevenr could you pls try if you are experiencing this issue also with pure JOSDK?
in case you can use it as a workaround for now, while it is fixed in QOSDK.
nevenr commentedon Sep 21, 2026
Hi @csviri ,
Thanks for your quick responses and care.
I already switched to Informer and ResourceEventHandler and with this approach I getting all events.
Kind regards,
N.
csviri commentedon Sep 23, 2026
I checked the reproducer and can confirm that this is an issue with QOSDK, it does not set the flag triggerReconcilerOnAllEvents properly.
csviri commentedon Sep 29, 2026
Closing this issue here, pls take it into in QOSDK @xstefank