From 8c5b970376722cae11b07fdb2607d5e15bf7b54c Mon Sep 17 00:00:00 2001 From: Michael Irwin Date: Thu, 8 Jul 2021 22:04:01 -0400 Subject: [PATCH] Fix container name used in kube log output Signed-off-by: Michael Irwin --- kube/client/client.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kube/client/client.go b/kube/client/client.go index 2dc1301b3..e363163f0 100644 --- a/kube/client/client.go +++ b/kube/client/client.go @@ -210,10 +210,11 @@ func (kc *KubeClient) GetLogs(ctx context.Context, projectName string, consumer } eg, ctx := errgroup.WithContext(ctx) for _, pod := range pods.Items { - request := kc.client.CoreV1().Pods(kc.namespace).GetLogs(pod.Name, &corev1.PodLogOptions{Follow: follow}) + podName := pod.Name + request := kc.client.CoreV1().Pods(kc.namespace).GetLogs(podName, &corev1.PodLogOptions{Follow: follow}) service := pod.Labels[api.ServiceLabel] w := utils.GetWriter(func(line string) { - consumer.Log(pod.Name, service, line) + consumer.Log(podName, service, line) }) eg.Go(func() error {