From e0c36f09eb9dac8f7d9bf784038b9b00a25bfa52 Mon Sep 17 00:00:00 2001 From: Tharsanan1 Date: Tue, 8 Oct 2024 09:13:21 +0530 Subject: [PATCH] Fix APIs not reconciling on adapter restarts --- .../internal/operator/controllers/dp/api_controller.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/adapter/internal/operator/controllers/dp/api_controller.go b/adapter/internal/operator/controllers/dp/api_controller.go index 140d23cf2..dc5aaaa13 100644 --- a/adapter/internal/operator/controllers/dp/api_controller.go +++ b/adapter/internal/operator/controllers/dp/api_controller.go @@ -1993,11 +1993,6 @@ func (apiReconciler *APIReconciler) getAPIsForGateway(ctx context.Context, obj k return []reconcile.Request{} } - if len(httpRouteList.Items) == 0 { - loggers.LoggerAPKOperator.Debugf("HTTPRoutes for Gateway not found: %s", utils.NamespacedName(gateway).String()) - return []reconcile.Request{} - } - grpcRouteList := &gwapiv1a2.GRPCRouteList{} if err := apiReconciler.client.List(ctx, grpcRouteList, &k8client.ListOptions{ FieldSelector: fields.OneTermEqualSelector(gatewayGRPCRouteIndex, utils.NamespacedName(gateway).String()), @@ -2006,11 +2001,6 @@ func (apiReconciler *APIReconciler) getAPIsForGateway(ctx context.Context, obj k return []reconcile.Request{} } - if len(grpcRouteList.Items) == 0 { - loggers.LoggerAPKOperator.Debugf("GRPCRoutes for Gateway not found: %s", utils.NamespacedName(gateway).String()) - return []reconcile.Request{} - } - requests := []reconcile.Request{} for item := range httpRouteList.Items { httpRoute := httpRouteList.Items[item]