mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-04-15 07:16:34 +00:00
include logs for init containers as well (#467)
This commit is contained in:
committed by
GitHub
parent
0df678929a
commit
5a8561a31f
@@ -74,7 +74,8 @@ func ClusterResources(c *Collector, clusterResourcesCollector *troubleshootv1bet
|
||||
output.SaveResult(c.BundlePath, "cluster-resources/pods-errors.json", marshalErrors(podErrors))
|
||||
|
||||
for _, pod := range failedPods {
|
||||
for _, container := range pod.Spec.Containers {
|
||||
allContainers := append(pod.Spec.InitContainers, pod.Spec.Containers...)
|
||||
for _, container := range allContainers {
|
||||
logsRoot := path.Join(c.BundlePath, "cluster-resources", "pods", pod.Namespace, "logs")
|
||||
limits := &troubleshootv1beta2.LogLimits{
|
||||
MaxLines: 500,
|
||||
|
||||
Reference in New Issue
Block a user