mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Add init containers to dump info
This commit is contained in:
parent
ad68c4a8b5
commit
a024ac14ef
@ -286,9 +286,13 @@ func (o *ClusterInfoDumpOptions) Run() error {
|
||||
|
||||
for ix := range pods.Items {
|
||||
pod := &pods.Items[ix]
|
||||
initcontainers := pod.Spec.InitContainers
|
||||
containers := pod.Spec.Containers
|
||||
writer := setupOutputWriter(o.OutputDir, o.Out, path.Join(namespace, pod.Name, "logs"), ".txt")
|
||||
|
||||
for i := range initcontainers {
|
||||
printContainer(writer, initcontainers[i], pod)
|
||||
}
|
||||
for i := range containers {
|
||||
printContainer(writer, containers[i], pod)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user