Skip to content

Commit f0c393b

Browse files
committed
javadoc
Signed-off-by: Attila Mészáros <[email protected]>
1 parent 92a9e72 commit f0c393b

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

docs/content/en/docs/documentation/reconciler.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,14 @@ to `true`, as a result, `reconcile` method will be triggered on ALL events (so a
240240
are free to optimize you reconciliation for the use cases above and possibly others.
241241

242242
In this mode:
243-
- you cannot use `Cleaner` interface. The framework assumes you will explicitly manage the finalizers. To
244-
add finalizer you can use [`PrimeUpdateAndCacheUtils`](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/PrimaryUpdateAndCacheUtils.java#L308).
245243
- even if the primary resource is already deleted from the Informer's cache, we will still pass the last known state
246244
as the parameter for the reconciler. You can check if the resource is deleted using `Context.isPrimaryResourceDeleted()`.
247-
- The retry, rate limiting, re-schedule mechanisms work normally. (The internal caches related to the resource
245+
- The retry, rate limiting, re-schedule, filters mechanisms work normally. (The internal caches related to the resource
248246
are cleaned up only when there was a successful reconiliation after `Delete` event received for the primary resource
249247
and reconciliation was not re-scheduled.
248+
- you cannot use `Cleaner` interface. The framework assumes you will explicitly manage the finalizers. To
249+
add finalizer you can use [`PrimeUpdateAndCacheUtils`](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/PrimaryUpdateAndCacheUtils.java#L308).
250250
- you cannot use managed dependent resources since those manage the finalizers and other logic related to the normal
251251
execution mode.
252+
252253

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/Context.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,20 @@ default <R> Stream<R> getSecondaryResourcesAsStream(Class<R> expectedType) {
7373
*/
7474
boolean isNextReconciliationImminent();
7575

76+
/**
77+
* To check if the primary resource is already deleted. This value can be true only if you turn on
78+
* {@link
79+
* io.javaoperatorsdk.operator.api.reconciler.ControllerConfiguration#triggerReconcilerOnAllEvent()}
80+
*
81+
* @return true Delete event received for primary resource
82+
*/
7683
boolean isPrimaryResourceDeleted();
7784

85+
/**
86+
* Check this only if {@link #isPrimaryResourceDeleted()} is true.
87+
*
88+
* @return true if the primary resource is deleted, but the last known state is only available
89+
* from the caches of the underlying Informer, not from Delete event.
90+
*/
7891
boolean isPrimaryResourceFinalStateUnknown();
7992
}

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/ControllerConfiguration.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,10 @@ MaxReconciliationInterval maxReconciliationInterval() default
7878
*/
7979
String fieldManager() default CONTROLLER_NAME_AS_FIELD_MANAGER;
8080

81+
/**
82+
* By settings to true, reconcile method will be triggered on every event, thus even for Delete
83+
* event. You cannot use {@link Cleaner} or managed dependent resources in that case. See
84+
* documentation for further details.
85+
*/
8186
boolean triggerReconcilerOnAllEvent() default false;
8287
}

0 commit comments

Comments
 (0)