|
12 | 12 | import io.fabric8.kubernetes.api.model.HasMetadata; |
13 | 13 | import io.fabric8.kubernetes.client.KubernetesClient; |
14 | 14 | import io.javaoperatorsdk.operator.api.monitoring.Metrics; |
| 15 | +import io.javaoperatorsdk.operator.api.reconciler.dependent.DependentResourceFactory; |
15 | 16 |
|
16 | 17 | @SuppressWarnings("unused") |
17 | 18 | public class ConfigurationServiceOverrider { |
@@ -39,6 +40,7 @@ public class ConfigurationServiceOverrider { |
39 | 40 | private Set<Class<? extends HasMetadata>> defaultNonSSAResource; |
40 | 41 | private Boolean previousAnnotationForDependentResources; |
41 | 42 | private Boolean parseResourceVersions; |
| 43 | + private DependentResourceFactory dependentResourceFactory; |
42 | 44 |
|
43 | 45 | ConfigurationServiceOverrider(ConfigurationService original) { |
44 | 46 | this.original = original; |
@@ -77,6 +79,12 @@ public ConfigurationServiceOverrider withMinConcurrentWorkflowExecutorThreads(in |
77 | 79 | return this; |
78 | 80 | } |
79 | 81 |
|
| 82 | + public ConfigurationServiceOverrider withDependentResourceFactory( |
| 83 | + DependentResourceFactory dependentResourceFactory) { |
| 84 | + this.dependentResourceFactory = dependentResourceFactory; |
| 85 | + return this; |
| 86 | + } |
| 87 | + |
80 | 88 | public ConfigurationServiceOverrider withResourceCloner(Cloner cloner) { |
81 | 89 | this.cloner = cloner; |
82 | 90 | return this; |
@@ -184,6 +192,12 @@ public boolean checkCRDAndValidateLocalModel() { |
184 | 192 | return checkCR != null ? checkCR : original.checkCRDAndValidateLocalModel(); |
185 | 193 | } |
186 | 194 |
|
| 195 | + @Override |
| 196 | + public DependentResourceFactory dependentResourceFactory() { |
| 197 | + return dependentResourceFactory != null ? dependentResourceFactory |
| 198 | + : DependentResourceFactory.DEFAULT; |
| 199 | + } |
| 200 | + |
187 | 201 | @Override |
188 | 202 | public int concurrentReconciliationThreads() { |
189 | 203 | return Utils.ensureValid( |
|
0 commit comments