gatewayapi: return early after creating new http routes

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
This commit is contained in:
Sanskar Jaiswal
2024-11-24 19:04:25 +05:30
parent d4f766285d
commit 4c0a26b675
2 changed files with 2 additions and 0 deletions

View File

@@ -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)
}

View File

@@ -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)
}