Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 8c5b970

Browse files
committed
Fix container name used in kube log output
Signed-off-by: Michael Irwin <[email protected]>
1 parent ed0b123 commit 8c5b970

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

kube/client/client.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,11 @@ func (kc *KubeClient) GetLogs(ctx context.Context, projectName string, consumer
210210
}
211211
eg, ctx := errgroup.WithContext(ctx)
212212
for _, pod := range pods.Items {
213-
request := kc.client.CoreV1().Pods(kc.namespace).GetLogs(pod.Name, &corev1.PodLogOptions{Follow: follow})
213+
podName := pod.Name
214+
request := kc.client.CoreV1().Pods(kc.namespace).GetLogs(podName, &corev1.PodLogOptions{Follow: follow})
214215
service := pod.Labels[api.ServiceLabel]
215216
w := utils.GetWriter(func(line string) {
216-
consumer.Log(pod.Name, service, line)
217+
consumer.Log(podName, service, line)
217218
})
218219

219220
eg.Go(func() error {

0 commit comments

Comments
 (0)