From 2c495b8a7a2c4b8942ce180d209136fc454a10b1 Mon Sep 17 00:00:00 2001 From: Andrew Lavery Date: Mon, 6 Apr 2020 18:02:37 -0400 Subject: [PATCH] include the container name in the file copy path destination if provided --- pkg/collect/copy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/collect/copy.go b/pkg/collect/copy.go index f3967899..4e807a84 100644 --- a/pkg/collect/copy.go +++ b/pkg/collect/copy.go @@ -34,7 +34,7 @@ func Copy(ctx *Context, copyCollector *troubleshootv1beta1.Copy) ([]byte, error) if len(pods) > 0 { for _, pod := range pods { - bundlePath := filepath.Join(copyCollector.Name, pod.Namespace, pod.Name) + bundlePath := filepath.Join(copyCollector.Name, pod.Namespace, pod.Name, copyCollector.ContainerName) files, copyErrors := copyFiles(ctx, client, pod, copyCollector) if len(copyErrors) > 0 {