Skip to content

Commit ab32a58

Browse files
committed
fix: use SSA matcher for bulk resources
1 parent 6352704 commit ab32a58

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Diff for: operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/dependent/kubernetes/KubernetesDependentResource.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,16 @@ public Result<R> match(R actualResource, P primary, Context<P> context) {
168168

169169
@SuppressWarnings("unused")
170170
public Result<R> match(R actualResource, R desired, P primary, Context<P> context) {
171-
return GenericKubernetesResourceMatcher.match(desired, actualResource, false,
172-
false, false, context);
171+
if (!context.getControllerConfiguration().getConfigurationService()
172+
.ssaBasedDefaultMatchingForDependentResources()) {
173+
return GenericKubernetesResourceMatcher.match(desired, actualResource, false,
174+
false, false, context);
175+
} else {
176+
addReferenceHandlingMetadata(desired, primary);
177+
var matches = SSABasedGenericKubernetesResourceMatcher.getInstance().matches(actualResource,
178+
desired, context);
179+
return Result.computed(matches, desired);
180+
}
173181
}
174182

175183
protected void handleDelete(P primary, R secondary, Context<P> context) {

0 commit comments

Comments
 (0)