Skip to content

Commit 5020e76

Browse files
committed
wip
1 parent bae1e76 commit 5020e76

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

docs/content/fileList.txt

Whitespace-only changes.

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/ResourceIDProvider.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
* Provides the identifier for an object that represents resource. This ID is used to select target
2020
* external resource for a dependent resource from the resources returned by `{@link
2121
* io.javaoperatorsdk.operator.api.reconciler.Context#getSecondaryResources(Class)}`. But also for
22-
* {@link ResourceIDMapper} for event sources in external resources.
22+
* {@link ResourceIDMapper} for event sources in external resources. But also for bulk dependent
23+
* resource see {@link
24+
* io.javaoperatorsdk.operator.processing.dependent.ExternalBulkDependentResource} and external
25+
* event sources, see {@link
26+
* io.javaoperatorsdk.operator.processing.event.source.ExternalResourceCachingEventSource}
2327
*
2428
* @param <ID>
2529
*/

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/dependent/ResourceIDMapperBulkDependentResource.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ default Map<ID, R> getSecondaryResources(P primary, Context<P> context) {
3838
.collect(Collectors.toMap(cm -> resourceIDMapper().idFor(cm), Function.identity()));
3939
}
4040

41+
/**
42+
* Override of not all the secondary resources of a certain type are related to the target
43+
* secondary resource.
44+
*
45+
* @param primary resource
46+
* @param context of reconciliation
47+
* @return predicate to filter secondary resources which are related to the bulk dependent.
48+
*/
4149
default Predicate<R> secondaryResourceFilter(P primary, Context<P> context) {
4250
return r -> true;
4351
}

0 commit comments

Comments
 (0)