File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -464,6 +464,24 @@ default boolean parseResourceVersionsForEventFilteringAndCaching() {
464464 return false ;
465465 }
466466
467+ /**
468+ * If you update the primary resource from the reconciler with or without {@link
469+ * io.javaoperatorsdk.operator.api.reconciler.UpdateControl} it is not guaranteed that for the
470+ * next reconciliation will receive the most up-to-date resource. This is a consequence of
471+ * Informers design in the Operator pattern.
472+ *
473+ * <p>The framework can be smart about it and make such guarantees, but this can be done
474+ * absolutely reliably only if it bends some rules of the Kubernetes API contract. Thus, if we
475+ * parse the resourceVersion of a primary resource as an integer and compare it with the version
476+ * of the resource in the cache. Note that this is a gray area, since with default setup Etcd
477+ * guarantees such monotonically increasing resource versions. But since it is still bending the
478+ * rules by default, this feature is turned off, and work only if {@link
479+ * #parseResourceVersionsForEventFilteringAndCaching} is also set to true.
480+ *
481+ * <p>See also {@link io.javaoperatorsdk.operator.api.reconciler.PrimaryUpdateAndCacheUtils}
482+ *
483+ * @return if the framework should cache the updated resource for next reconciliation
484+ */
467485 default boolean cacheUpdatedResourcesViaUpdateControl () {
468486 return false ;
469487 }
You can’t perform that action at this time.
0 commit comments