Skip to content

Commit 6a8c675

Browse files
committed
Update reconciler.md
1 parent d0dfac8 commit 6a8c675

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

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

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,23 @@ weight: 45
66
## Reconciliation Execution in a Nutshell
77

88
An event always triggers reconciliation execution. Events typically come from a
9-
primary resource, most of the time a custom resource, triggered by changes made to that resource
10-
on the server (e.g. a resource is created, updated, or deleted). Reconciler implementations are
11-
associated with a given resource type and listen for such events from the Kubernetes API server
9+
primary resource, usually a custom resource, triggered by changes made to that resource
10+
on the server (e.g. a resource is created, updated, or deleted) or from secondary resources for which there is a registered event source.
11+
Reconciler implementations are associated with a given resource type and listen for such events from the Kubernetes API server
1212
so that they can appropriately react to them. It is, however, possible for secondary sources to
13-
trigger the reconciliation process. This usually occurs via
13+
trigger the reconciliation process. This occurs via
1414
the [event source](#handling-related-events-with-event-sources) mechanism.
1515

16-
When we receive an event it triggers the reconciliation, unless a reconciliation is already
17-
underway for this particular resource. In other words, the framework guarantees that no
18-
concurrent reconciliation happens for a resource.
16+
When we receive an event, it triggers the reconciliation unless a reconciliation is already
17+
underway for this particular resource. In other words, the framework guarantees that no concurrent reconciliation happens for a resource.
1918

2019
Once the reconciliation is done, the framework checks if:
2120

2221
- an exception was thrown during execution, and if yes, schedules a retry.
2322
- new events were received during the controller execution; if yes, schedule a new reconciliation.
2423
- the reconciler results explicitly re-schedules (`UpdateControl.rescheduleAfter(..)`) a reconciliation with a time delay, if yes,
2524
schedules a timer event with the specific delay.
26-
- if none above applies, the reconciliation is finished.
25+
- if none of the above applies, the reconciliation is finished.
2726

2827
In summary, the core of the SDK is implemented as an eventing system where events trigger
2928
reconciliation requests.
@@ -43,7 +42,7 @@ See [Finalizer support](#finalizer-support) for more details.
4342

4443
### Using `UpdateControl` and `DeleteControl`
4544

46-
These two classes are used to control the outcome or the desired behaviour after the reconciliation.
45+
These two classes control the outcome or the desired behavior after the reconciliation.
4746

4847
The [`UpdateControl`](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/UpdateControl.java)
4948
can instruct the framework to update the status sub-resource of the resource
@@ -71,13 +70,10 @@ without an update:
7170
}
7271
```
7372

74-
Note, though, that using `EventSources` should be preferred to rescheduling since the
75-
reconciliation will then be triggered only when needed instead than on a timely basis.
76-
77-
Those are the typical use cases of resource updates, however in some cases there it can happen that
78-
the controller wants to update the resource itself (for example to add annotations) or not perform
79-
any updates, which is also supported.
73+
Note, though, that using `EventSources` is the preferred way of scheduling since the
74+
reconciliation is triggered only when a resource is changed, not on a timely basis.
8075

76+
At the end of the reconciliation, you typically update the status sub-resources.
8177
It is also possible to update both the status and the resource with the `patchResourceAndStatus` method. In this case,
8278
the resource is updated first followed by the status, using two separate requests to the Kubernetes API.
8379

0 commit comments

Comments
 (0)