diff --git a/pkg/canary/deployer.go b/pkg/canary/deployer.go index 45a56879..fdeb2fbc 100644 --- a/pkg/canary/deployer.go +++ b/pkg/canary/deployer.go @@ -367,7 +367,7 @@ func (c *Deployer) getPorts(deployment *appsv1.Deployment, canaryPort int32) (ma if p.ContainerPort == canaryPort { continue } - name := fmt.Sprintf("tcp-%v", i) + name := fmt.Sprintf("tcp-%s-%v", container.Name, i) if p.Name != "" { name = p.Name } diff --git a/pkg/controller/scheduler_test.go b/pkg/controller/scheduler_test.go index 67e45959..32ba819d 100644 --- a/pkg/controller/scheduler_test.go +++ b/pkg/controller/scheduler_test.go @@ -361,7 +361,7 @@ func TestScheduler_PortDiscovery(t *testing.T) { case "http 9898", "http-metrics 8080", - "tcp-2 8888": + "tcp-podinfo-2 8888": return true } return false