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
Copy file name to clipboardExpand all lines: docs/content/en/docs/documentation/reconciler.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -182,10 +182,11 @@ require the latest status version possible, for example, if the status subresour
182
182
See [Representing Allocated Values](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#representing-allocated-values)
183
183
from the Kubernetes docs for more details.
184
184
185
-
The framework provides utilities to help with these use cases:
[`PrimaryUpdateAndCacheUtils`](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/PrimaryUpdateAndCacheUtils.java) utility class
187
+
to help with these use cases.
187
188
188
-
Framework you can use internal caches in combination with update methods that use
189
+
This class' methods use internal caches in combination with update methods that leveraging
189
190
optimistic locking. If the update method fails on optimistic locking, it will retry
190
191
using a fresh resource from the server as base for modification.
191
192
@@ -206,10 +207,11 @@ public UpdateControl<StatusPatchCacheCustomResource> reconcile(
206
207
}
207
208
```
208
209
209
-
After the update `PrimaryUpdateAndCacheUtils.ssaPatchStatusAndCacheResource` puts the response of the update into an internal
210
-
cache and the framework will make sure that the next reconciliation will contain the most recent version of the resource.
211
-
Note that it is not necessarily the version of the resource you got as response from the update, it can be newer since other parties
212
-
can do additional updates meanwhile. However, if not explicitly modified, it will contain the up-to-date resource.
210
+
After the update `PrimaryUpdateAndCacheUtils.ssaPatchStatusAndCacheResourceWithLock` puts the result of the update into an internal
211
+
cache and the framework will make sure that the next reconciliation contains the most recent version of the resource.
212
+
Note that it is not necessarily the same version returned as response from the update, it can be a newer version since other parties
213
+
can do additional updates meanwhile. However, unless it has been explicitly modified, that
214
+
resource will contain the up-to-date status.
213
215
214
-
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).
215
216
217
+
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).
0 commit comments