From 5cb8697fd90bde39909609a3a8b6a62ac867f602 Mon Sep 17 00:00:00 2001 From: sh2 Date: Tue, 12 Sep 2023 10:01:53 +0800 Subject: [PATCH] fix: skip the not found filters in grpc routes (#1873) add continue to the not found filters in grpc routes Signed-off-by: sh2 --- internal/provider/kubernetes/routes.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/provider/kubernetes/routes.go b/internal/provider/kubernetes/routes.go index d3d9fbea6d4..cc33db4e4f2 100644 --- a/internal/provider/kubernetes/routes.go +++ b/internal/provider/kubernetes/routes.go @@ -182,6 +182,7 @@ func (r *gatewayAPIReconciler) processGRPCRoutes(ctx context.Context, gatewayNam authFilter, ok := resourceMap.authenFilters[key] if !ok { r.log.Error(err, "AuthenticationFilter not found; bypassing rule", "index", i) + continue } resourceTree.AuthenticationFilters = append(resourceTree.AuthenticationFilters, authFilter) @@ -193,6 +194,7 @@ func (r *gatewayAPIReconciler) processGRPCRoutes(ctx context.Context, gatewayNam rateLimitFilter, ok := resourceMap.rateLimitFilters[key] if !ok { r.log.Error(err, "RateLimitFilter not found; bypassing rule", "index", i) + continue } resourceTree.RateLimitFilters = append(resourceTree.RateLimitFilters, rateLimitFilter)