summaryrefslogtreecommitdiff
path: root/cmd/podman/play
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/play')
-rw-r--r--cmd/podman/play/kube.go34
1 files changed, 21 insertions, 13 deletions
diff --git a/cmd/podman/play/kube.go b/cmd/podman/play/kube.go
index 1fbf24d5e..c26ca9853 100644
--- a/cmd/podman/play/kube.go
+++ b/cmd/podman/play/kube.go
@@ -92,21 +92,29 @@ func kube(cmd *cobra.Command, args []string) error {
return err
}
- for _, l := range report.Logs {
- fmt.Fprintf(os.Stderr, l)
+ for _, pod := range report.Pods {
+ for _, l := range pod.Logs {
+ fmt.Fprintf(os.Stderr, l)
+ }
}
- fmt.Printf("Pod:\n%s\n", report.Pod)
- switch len(report.Containers) {
- case 0:
- return nil
- case 1:
- fmt.Printf("Container:\n")
- default:
- fmt.Printf("Containers:\n")
- }
- for _, ctr := range report.Containers {
- fmt.Println(ctr)
+ for _, pod := range report.Pods {
+ fmt.Printf("Pod:\n")
+ fmt.Println(pod.ID)
+
+ switch len(pod.Containers) {
+ case 0:
+ continue
+ case 1:
+ fmt.Printf("Container:\n")
+ default:
+ fmt.Printf("Containers:\n")
+ }
+ for _, ctr := range pod.Containers {
+ fmt.Println(ctr)
+ }
+ // Empty line for space for next block
+ fmt.Println()
}
return nil