Skip to content

Commit df81981

Browse files
committed
enabling parse versions by default
1 parent 2902bff commit df81981

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -491,18 +491,16 @@ default Set<Class<? extends HasMetadata>> withPreviousAnnotationForDependentReso
491491

492492
/**
493493
* If the event logic should parse the resourceVersion to determine the ordering of dependent
494-
* resource events. This is typically not needed.
494+
* resource events.
495495
*
496-
* <p>Disabled by default as Kubernetes does not support, and discourages, this interpretation of
497-
* resourceVersions. Enable only if your api server event processing seems to lag the operator
498-
* logic, and you want to further minimize the amount of work done / updates issued by the
499-
* operator.
496+
* <p>Enabled by default as Kubernetes does support this interpretation of resourceVersions.
497+
* Disable only if your api server provides non comparable resource versions..
500498
*
501499
* @return if resource version should be parsed (as integer)
502500
* @since 4.5.0
503501
*/
504502
default boolean parseResourceVersionsForEventFilteringAndCaching() {
505-
return false;
503+
return true;
506504
}
507505

508506
/**

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/controller/ControllerEventSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class ControllerEventSource<T extends HasMetadata>
4747

4848
@SuppressWarnings({"unchecked", "rawtypes"})
4949
public ControllerEventSource(Controller<T> controller) {
50-
super(NAME, controller.getCRClient(), controller.getConfiguration(), false);
50+
super(NAME, controller.getCRClient(), controller.getConfiguration(), true);
5151
this.controller = controller;
5252

5353
final var config = controller.getConfiguration();

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerEventSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public InformerEventSource(
9292
}
9393

9494
InformerEventSource(InformerEventSourceConfiguration<R> configuration, KubernetesClient client) {
95-
this(configuration, client, false);
95+
this(configuration, client, true);
9696
}
9797

9898
@SuppressWarnings({"unchecked", "rawtypes"})

0 commit comments

Comments
 (0)