Skip to content

Commit

Permalink
Fix Route deletion after route listener is removed (strimzi#10845)
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Scholz <[email protected]>
  • Loading branch information
scholzj authored Nov 20, 2024
1 parent 7c260aa commit 8dbaae3
Show file tree
Hide file tree
Showing 2 changed files with 417 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ protected Future<Void> routes() {
List<Route> routes = new ArrayList<>(kafka.generateExternalBootstrapRoutes());
routes.addAll(kafka.generateExternalRoutes());

if (routes.size() > 0) {
if (pfa.hasRoutes()) {
return routeOperator.batchReconcile(reconciliation, reconciliation.namespace(), routes, kafka.getSelectorLabels()).map((Void) null);
} else {
if (pfa.hasRoutes()) {
return routeOperator.batchReconcile(reconciliation, reconciliation.namespace(), routes, kafka.getSelectorLabels()).map((Void) null);
} else {
if (!routes.isEmpty()) {
LOGGER.warnCr(reconciliation, "The OpenShift route API is not available in this Kubernetes cluster. Exposing Kafka cluster {} using routes is not possible.", reconciliation.name());
return Future.failedFuture("The OpenShift route API is not available in this Kubernetes cluster. Exposing Kafka cluster " + reconciliation.name() + " using routes is not possible.");
} else {
return Future.succeededFuture();
}
} else {
return Future.succeededFuture();
}
}

Expand Down
Loading

0 comments on commit 8dbaae3

Please sign in to comment.