Skip to content

Commit 6d4da4c

Browse files
committed
wip
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
1 parent ac8bb77 commit 6d4da4c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/content/en/docs/documentation/access-resources.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Such capabilities are:
3434
The question is, how to trigger reconciliation of a primary resources (your custom resource),
3535
when Informer receives a new resource.
3636
For this purpose the framework uses [`SecondaryToPrimaryMapper`](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/SecondaryToPrimaryMapper.java)
37-
that tells (mostly) based on the resource which primary resource reconciliation to trigger.
37+
that tells (usually) based on the resource which primary resource reconciliation to trigger.
3838
The mapping is usually done based on the owner reference or annotation on the secondary resource.
3939
(But not always, as we will see)
4040

@@ -94,16 +94,17 @@ public class WebPageReconciler implements Reconciler<WebPage> {
9494

9595
## The Use Case for PrimaryToSecondaryMapper
9696

97-
As we discussed, we provide an unified API to access related resources using `Context.getSecondaryResources(...)`.
97+
As we discussed, we provide a unified API to access related resources using `Context.getSecondaryResources(...)`.
9898
This method was on purpose uses `Secondary` resource, since those are not only child resources - how
9999
resources that are created by the reconciler are sometimes called in Kubernetes world - and usually have owner references for the custom resources;
100-
neither related resources which are usually resources that serves as input for the primary (not managed). It is the union of both.
100+
neither related resources which are usually resources that serves as input for the primary (not managed).
101+
It is the union of both.
101102

102103
The issue is if we want to trigger reconciliation for a resource, that does not have an owner reference or other direct
103104
association with the primary resource.
104105
Typically, if you have ConfigMap where you have input parameters for a set of primary resources,
105-
and the primary is actually referencing the secondary resource. Like having the name of the ConfigMap in the spec part
106-
of the primary resource.
106+
and the primary is actually referencing the secondary resource.
107+
In other words, having the name of the ConfigMap in the spec part of the primary resource.
107108

108109
As an example we provide, have a primary resource a `Job` that references a `Cluster` resource.
109110
So multiple `Job` can reference the same `Cluster`, and we want to trigger `Job` reconciliation if cluster changes.

0 commit comments

Comments
 (0)