Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix Route deletion after route listener is removed #10845

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading