Skip to content

Commit 157d74e

Browse files
author
Ramesh Malla
committed
feat:Made ConfigurationServiceOverrider to accept dependent resource factory
Signed-off-by: Ramesh Malla <[email protected]>
1 parent 16066ea commit 157d74e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationServiceOverrider.java

+13
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import io.fabric8.kubernetes.api.model.HasMetadata;
1313
import io.fabric8.kubernetes.client.KubernetesClient;
1414
import io.javaoperatorsdk.operator.api.monitoring.Metrics;
15+
import io.javaoperatorsdk.operator.api.reconciler.dependent.DependentResourceFactory;
1516

1617
@SuppressWarnings("unused")
1718
public class ConfigurationServiceOverrider {
@@ -39,6 +40,7 @@ public class ConfigurationServiceOverrider {
3940
private Set<Class<? extends HasMetadata>> defaultNonSSAResource;
4041
private Boolean previousAnnotationForDependentResources;
4142
private Boolean parseResourceVersions;
43+
private DependentResourceFactory dependentResourceFactory;
4244

4345
ConfigurationServiceOverrider(ConfigurationService original) {
4446
this.original = original;
@@ -77,6 +79,12 @@ public ConfigurationServiceOverrider withMinConcurrentWorkflowExecutorThreads(in
7779
return this;
7880
}
7981

82+
public ConfigurationServiceOverrider withDependentResourceFactory(DependentResourceFactory dependentResourceFactory) {
83+
this.dependentResourceFactory = dependentResourceFactory != null ? dependentResourceFactory
84+
: DependentResourceFactory.DEFAULT;
85+
return this;
86+
}
87+
8088
public ConfigurationServiceOverrider withResourceCloner(Cloner cloner) {
8189
this.cloner = cloner;
8290
return this;
@@ -184,6 +192,11 @@ public boolean checkCRDAndValidateLocalModel() {
184192
return checkCR != null ? checkCR : original.checkCRDAndValidateLocalModel();
185193
}
186194

195+
@Override
196+
public DependentResourceFactory dependentResourceFactory() {
197+
return dependentResourceFactory;
198+
}
199+
187200
@Override
188201
public int concurrentReconciliationThreads() {
189202
return Utils.ensureValid(

0 commit comments

Comments
 (0)