Update podlogs.go

Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>
This commit is contained in:
Peter Rifel 2024-01-01 21:51:26 -06:00 committed by GitHub
parent 8ad0661975
commit f731080867
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ func (d *podLogDumper) DumpLogs(ctx context.Context) error {
func (d *podLogDumper) getPodLogs(ctx context.Context, pods chan v1.Pod, results chan podLogDumpResult) {
for pod := range pods {
for _, container := range pod.Spec.Containers {
for _, container := range append(pod.Spec.InitContainers, pod.Spec.Containers...) {
resPath := path.Join(d.artifactsDir, "cluster-info", pod.Namespace, pod.Name, container.Name+".log")
err := os.MkdirAll(path.Dir(resPath), 0755)