Attila Mészáros
Attila Mészáros
User would just set it in the reconciler.
A feature flag would also be convenient to control this.
replaced by: https://github.com/operator-framework/java-operator-sdk/pull/2406
Hi @AleksanderBrzozowski , thx for the issue, > Make sure that the finalizer is applied first before creating secondary resources Actually, this should be the case. Will take a look.
This is the code part: https://github.com/operator-framework/java-operator-sdk/blob/6d24455a4ee181cb1994cc4a89d4cf08fcdcc34c/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/ReconciliationDispatcher.java#L104-L125
reproduce it, seems that the cleanup is not called when it fails (at least in my case), while the finalizer is added. If you log the resource in the reconciler...
Notes: it theoretically can happen that the ConfigMap is created but on cleanup is not in the cache yet, so it will not be deleted (this is a limitation and...
> Are you saying that we can somehow fix this issue by modifying the code? The ConfigMapDependentResource already extends KubernetesDependentResource class 🙂 No, not saying that :) still investigating, will...
interesting is that I created a reproducer now in pure Java and not using Quarkus and not able to reproduce there: https://github.com/csviri/race-condition-reproducer
The problem seems to be that there is a `Delete` event received at some point. Which should not be there, this could be event from the previous test case. This...