diff --git a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationServiceOverrider.java b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationServiceOverrider.java index 2a2f6964c1..5879383464 100644 --- a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationServiceOverrider.java +++ b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationServiceOverrider.java @@ -12,6 +12,7 @@ import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.client.KubernetesClient; import io.javaoperatorsdk.operator.api.monitoring.Metrics; +import io.javaoperatorsdk.operator.api.reconciler.dependent.DependentResourceFactory; @SuppressWarnings("unused") public class ConfigurationServiceOverrider { @@ -39,6 +40,7 @@ public class ConfigurationServiceOverrider { private Set> defaultNonSSAResource; private Boolean previousAnnotationForDependentResources; private Boolean parseResourceVersions; + private DependentResourceFactory dependentResourceFactory; ConfigurationServiceOverrider(ConfigurationService original) { this.original = original; @@ -77,6 +79,12 @@ public ConfigurationServiceOverrider withMinConcurrentWorkflowExecutorThreads(in return this; } + public ConfigurationServiceOverrider withDependentResourceFactory( + DependentResourceFactory dependentResourceFactory) { + this.dependentResourceFactory = dependentResourceFactory; + return this; + } + public ConfigurationServiceOverrider withResourceCloner(Cloner cloner) { this.cloner = cloner; return this; @@ -184,6 +192,12 @@ public boolean checkCRDAndValidateLocalModel() { return checkCR != null ? checkCR : original.checkCRDAndValidateLocalModel(); } + @Override + public DependentResourceFactory dependentResourceFactory() { + return dependentResourceFactory != null ? dependentResourceFactory + : DependentResourceFactory.DEFAULT; + } + @Override public int concurrentReconciliationThreads() { return Utils.ensureValid(