From 5e880d3942af2292f4d44eec4bf0ac9494bdb143 Mon Sep 17 00:00:00 2001 From: Carlos Sanchez Date: Tue, 15 Jan 2019 18:10:03 +0100 Subject: [PATCH] Wrong VirtualService routes If deployment name is different from canary name the virtual service routes are created with canary name but the services are created with deployment name Note that canary name should match deployment name --- pkg/controller/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/router.go b/pkg/controller/router.go index 30459452..1bf27525 100644 --- a/pkg/controller/router.go +++ b/pkg/controller/router.go @@ -164,7 +164,7 @@ func (c *CanaryRouter) createServices(cd *flaggerv1.Canary) error { } func (c *CanaryRouter) createVirtualService(cd *flaggerv1.Canary) error { - canaryName := cd.Name + canaryName := cd.Spec.TargetRef.Name primaryName := fmt.Sprintf("%s-primary", canaryName) hosts := append(cd.Spec.Service.Hosts, canaryName) gateways := append(cd.Spec.Service.Gateways, "mesh")