File tree 2 files changed +13
-5
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api
2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import io .fabric8 .kubernetes .api .model .HasMetadata ;
4
4
import io .fabric8 .kubernetes .client .CustomResource ;
5
+ import io .javaoperatorsdk .operator .api .config .ConfigurationService ;
5
6
import io .javaoperatorsdk .operator .api .reconciler .UpdateControl ;
6
7
7
8
/**
11
12
* In order for this automatic handling to work the status object returned by
12
13
* {@link CustomResource#getStatus()} should not be null.
13
14
* <p>
14
- * The observed generation is updated even when {@link UpdateControl#noUpdate()} or
15
- * {@link UpdateControl#updateResource(HasMetadata)} is called. Although those results call normally
16
- * does not result in a status update, there will be a subsequent status update Kubernetes API call
17
- * in this case.
15
+ * The observed generation is updated with SSA mode only if
16
+ * {@link UpdateControl#patchStatus(HasMetadata)} or
17
+ * {@link UpdateControl#patchResourceAndStatus(HasMetadata)} is called. In non-SSA mode (see
18
+ * {@link ConfigurationService#useSSAToPatchPrimaryResource()}) observed generation is update even
19
+ * if patch is not called.
18
20
*
19
21
* @see ObservedGenerationAwareStatus
20
22
*/
Original file line number Diff line number Diff line change @@ -337,6 +337,8 @@ default ExecutorServiceManager getExecutorServiceManager() {
337
337
* method of Kubernetes Dependent Resource.
338
338
*
339
339
* @since 4.4.0
340
+ *
341
+ * @return if SSA should be used for dependent resources
340
342
*/
341
343
default boolean ssaBasedCreateUpdateMatchForDependentResources () {
342
344
return true ;
@@ -365,6 +367,8 @@ default Set<Class<? extends HasMetadata>> defaultNonSSAResource() {
365
367
* Disable this if you want to react to your own dependent resource updates
366
368
*
367
369
* @since 4.5.0
370
+ *
371
+ * @return if special annotation should be used for dependent resource to filter events
368
372
*/
369
373
default boolean previousAnnotationForDependentResourcesEventFiltering () {
370
374
return true ;
@@ -376,10 +380,12 @@ default boolean previousAnnotationForDependentResourcesEventFiltering() {
376
380
* <p>
377
381
* Disabled by default as Kubernetes does not support, and discourages, this interpretation of
378
382
* resourceVersions. Enable only if your api server event processing seems to lag the operator
379
- * logic and you want to further minimize the the amount of work done / updates issued by the
383
+ * logic, and you want to further minimize the amount of work done / updates issued by the
380
384
* operator.
381
385
*
382
386
* @since 4.5.0
387
+ *
388
+ * @return if resource version should be parsed (as integer)
383
389
*/
384
390
default boolean parseResourceVersionsForEventFilteringAndCaching () {
385
391
return false ;
You can’t perform that action at this time.
0 commit comments