getOperatorLogs fetches istio-operator logs for the given namespace/pod and writes the output.
(runner *kubectlcmd.Runner, config *config.BugReportConfig, resources *cluster2.Resources, namespace, pod string, wg *sync.WaitGroup, )
| 471 | |
| 472 | // getOperatorLogs fetches istio-operator logs for the given namespace/pod and writes the output. |
| 473 | func getOperatorLogs(runner *kubectlcmd.Runner, config *config.BugReportConfig, resources *cluster2.Resources, |
| 474 | namespace, pod string, wg *sync.WaitGroup, |
| 475 | ) { |
| 476 | startTime := time.Now() |
| 477 | wg.Add(1) |
| 478 | log.Infof("Waiting on operator logs for %v/%v", namespace, pod) |
| 479 | go func() { |
| 480 | defer func() { |
| 481 | wg.Done() |
| 482 | logRuntime(startTime, "Done getting operator logs for %v/%v", namespace, pod) |
| 483 | }() |
| 484 | |
| 485 | clog, _, _, err := getLog(runner, resources, config, namespace, pod, common.OperatorContainerName) |
| 486 | appendGlobalErr(err) |
| 487 | writeFile(filepath.Join(archive.OperatorPath(tempDir, namespace, pod), "operator.log"), clog, config.DryRun) |
| 488 | log.Infof("Done with operator logs for %v/%v", namespace, pod) |
| 489 | }() |
| 490 | } |
| 491 | |
| 492 | // getCniLogs fetches Cni logs from istio-cni-node daemonsets inside namespace kube-system and writes the output |
| 493 | // Runs if a goroutine, with errors reported through gErrors |
no test coverage detected
searching dependent graphs…