From 4c0a26b67598762160c1068e892f150561da134e Mon Sep 17 00:00:00 2001 From: Sanskar Jaiswal Date: Sun, 24 Nov 2024 19:04:25 +0530 Subject: [PATCH] gatewayapi: return early after creating new http routes Signed-off-by: Sanskar Jaiswal --- pkg/router/gateway_api.go | 1 + pkg/router/gateway_api_v1beta1.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/router/gateway_api.go b/pkg/router/gateway_api.go index 7d2ae79d1..bc398afda 100644 --- a/pkg/router/gateway_api.go +++ b/pkg/router/gateway_api.go @@ -180,6 +180,7 @@ func (gwr *GatewayAPIRouter) Reconcile(canary *flaggerv1.Canary) error { } gwr.logger.With("canary", fmt.Sprintf("%s.%s", canary.Name, canary.Namespace)). Infof("HTTPRoute %s.%s created", route.GetName(), hrNamespace) + return nil } else if err != nil { return fmt.Errorf("HTTPRoute %s.%s get error: %w", apexSvcName, hrNamespace, err) } diff --git a/pkg/router/gateway_api_v1beta1.go b/pkg/router/gateway_api_v1beta1.go index e9042ea28..b9d8e40e1 100644 --- a/pkg/router/gateway_api_v1beta1.go +++ b/pkg/router/gateway_api_v1beta1.go @@ -162,6 +162,7 @@ func (gwr *GatewayAPIV1Beta1Router) Reconcile(canary *flaggerv1.Canary) error { } gwr.logger.With("canary", fmt.Sprintf("%s.%s", canary.Name, canary.Namespace)). Infof("HTTPRoute %s.%s created", route.GetName(), hrNamespace) + return nil } else if err != nil { return fmt.Errorf("HTTPRoute %s.%s get error: %w", apexSvcName, hrNamespace, err) }