From e593f2e2587cceea72949defc4725a5954d391f9 Mon Sep 17 00:00:00 2001 From: Sanskar Jaiswal Date: Mon, 10 Oct 2022 16:29:19 +0530 Subject: [PATCH] gatewayapi: fix reconcilation of nil hostnames Signed-off-by: Sanskar Jaiswal --- pkg/router/gateway_api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/router/gateway_api.go b/pkg/router/gateway_api.go index 215f3232..5a9127c9 100644 --- a/pkg/router/gateway_api.go +++ b/pkg/router/gateway_api.go @@ -66,7 +66,7 @@ func (gwr *GatewayAPIRouter) Reconcile(canary *flaggerv1.Canary) error { hrNamespace := canary.Namespace - hostNames := []v1alpha2.Hostname{} + var hostNames []v1alpha2.Hostname for _, host := range canary.Spec.Service.Hosts { hostNames = append(hostNames, v1alpha2.Hostname(host)) } @@ -179,7 +179,7 @@ func (gwr *GatewayAPIRouter) Reconcile(canary *flaggerv1.Canary) error { return fmt.Errorf("HTTPRoute %s.%s update error: %w while reconciling", hrClone.GetName(), hrNamespace, err) } gwr.logger.With("canary", fmt.Sprintf("%s.%s", canary.Name, canary.Namespace)). - Infof("HTTPProxy %s.%s updated", hrClone.GetName(), hrNamespace) + Infof("HTTPRoute %s.%s updated", hrClone.GetName(), hrNamespace) } }