Skip to content

Commit 3c24f70

Browse files
authored
fix: EventSourceManager access fix (#580)
1 parent 4d36922 commit 3c24f70

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

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

+7-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class ConfiguredController<R extends CustomResource<?, ?>> implements Res
2727
private final ResourceController<R> controller;
2828
private final ControllerConfiguration<R> configuration;
2929
private final KubernetesClient k8sClient;
30-
private EventSourceManager manager;
30+
private EventSourceManager eventSourceManager;
3131

3232
public ConfiguredController(ResourceController<R> controller,
3333
ControllerConfiguration<R> configuration,
@@ -174,7 +174,7 @@ public void start() throws OperatorException {
174174
}
175175

176176
try {
177-
DefaultEventSourceManager<R> eventSourceManager = new DefaultEventSourceManager<>(this);
177+
eventSourceManager = new DefaultEventSourceManager<>(this);
178178
controller.init(eventSourceManager);
179179
} catch (MissingCRDException e) {
180180
throwMissingCRDException(crdName, specVersion, controllerName);
@@ -217,11 +217,14 @@ private boolean failOnMissingCurrentNS() {
217217
return false;
218218
}
219219

220+
public EventSourceManager getEventSourceManager() {
221+
return eventSourceManager;
222+
}
220223

221224
@Override
222225
public void close() throws IOException {
223-
if (manager != null) {
224-
manager.close();
226+
if (eventSourceManager != null) {
227+
eventSourceManager.close();
225228
}
226229
}
227230
}

0 commit comments

Comments
 (0)