diff --git a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/Operator.java b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/Operator.java index ae094b25c6..8812d8d6b3 100644 --- a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/Operator.java +++ b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/Operator.java @@ -137,12 +137,11 @@ public void close() { throws OperatorException { final var existing = configurationService.getConfigurationFor(controller); if (existing == null) { - log.warn( - "Skipping registration of {} controller named {} because its configuration cannot be found.\n" - + "Known controllers are: {}", - controller.getClass().getCanonicalName(), - ControllerUtils.getNameFor(controller), - configurationService.getKnownControllerNames()); + throw new OperatorException( + "Cannot register controller with name " + controller.getClass().getCanonicalName() + + " controller named " + ControllerUtils.getNameFor(controller) + + " because its configuration cannot be found.\n" + + " Known controllers are: " + configurationService.getKnownControllerNames()); } else { if (configuration == null) { configuration = existing;