You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See related [integration test](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/statuscache/updatecontrol/UpdateControlPrimaryCacheCustomResource.java).
217
+
218
+
If you need to do update of the resource during the reconciliation you can just use `PrimaryUpdateAndCacheUtils`.
219
+
(The code below is equivalent to the one above.)
220
+
Note that this utility does not require to set `withGuaranteeUpdatedPrimaryIsAvailableForNextReconciliation` to true.
@@ -207,10 +236,12 @@ public UpdateControl<StatusPatchCacheCustomResource> reconcile(
207
236
}
208
237
```
209
238
210
-
In the background `PrimaryUpdateAndCacheUtils.ssaPatchAndCacheStatus` puts the result of the update into an internal
211
-
cache and will make sure that the next reconciliation will contain the most recent version of the resource. Note that it
212
-
is not necessarily the version of the resource you got as response from the update, it can be newer since other parties
213
-
can do additional updates meanwhile, but if not explicitly modified, it will contain the up-to-date status.
239
+
In the background `PrimaryUpdateAndCacheUtils.ssaPatchAndCacheStatus` and also the mechanism behind `UpdateControl.patchStatus`
240
+
puts the result of the update into an internal cache and will make sure that the next reconciliation will contain the
241
+
most recent version of the resource.
242
+
Note that it is not necessarily the version of the resource you got as a response
243
+
from the update, it can be more recent since other parties can do additional updates meanwhile.
244
+
But if not explicitly modified by another party, it will contain the up-to-date status.
214
245
215
246
See related integration test [here](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/statuscache/internal).
0 commit comments