diff --git a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/ObservedGenerationAware.java b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/ObservedGenerationAware.java index 069953a32d..eafe51e6f4 100644 --- a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/ObservedGenerationAware.java +++ b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/ObservedGenerationAware.java @@ -2,6 +2,7 @@ import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.client.CustomResource; +import io.javaoperatorsdk.operator.api.config.ConfigurationService; import io.javaoperatorsdk.operator.api.reconciler.UpdateControl; /** @@ -11,10 +12,11 @@ * In order for this automatic handling to work the status object returned by * {@link CustomResource#getStatus()} should not be null. *
- * The observed generation is updated even when {@link UpdateControl#noUpdate()} or
- * {@link UpdateControl#updateResource(HasMetadata)} is called. Although those results call normally
- * does not result in a status update, there will be a subsequent status update Kubernetes API call
- * in this case.
+ * The observed generation is updated with SSA mode only if
+ * {@link UpdateControl#patchStatus(HasMetadata)} or
+ * {@link UpdateControl#patchResourceAndStatus(HasMetadata)} is called. In non-SSA mode (see
+ * {@link ConfigurationService#useSSAToPatchPrimaryResource()}) observed generation is update even
+ * if patch is not called.
*
* @see ObservedGenerationAwareStatus
*/
diff --git a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java
index 3fee02d044..ae38ed01c5 100644
--- a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java
+++ b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java
@@ -327,6 +327,8 @@ default ExecutorServiceManager getExecutorServiceManager() {
* method of Kubernetes Dependent Resource.
*
* @since 4.4.0
+ *
+ * @return if SSA should be used for dependent resources
*/
default boolean ssaBasedCreateUpdateMatchForDependentResources() {
return true;
@@ -355,6 +357,8 @@ default Set
* Disabled by default as Kubernetes does not support, and discourages, this interpretation of
* resourceVersions. Enable only if your api server event processing seems to lag the operator
- * logic and you want to further minimize the the amount of work done / updates issued by the
+ * logic, and you want to further minimize the amount of work done / updates issued by the
* operator.
*
* @since 4.5.0
+ *
+ * @return if resource version should be parsed (as integer)
*/
default boolean parseResourceVersionsForEventFilteringAndCaching() {
return false;