diff options
author | Peter Hunt <pehunt@redhat.com> | 2019-04-18 09:02:04 -0400 |
---|---|---|
committer | Peter Hunt <pehunt@redhat.com> | 2019-04-18 09:18:53 -0400 |
commit | 8c478f94f944e7cd81a38576bcb4469e1cda75a5 (patch) | |
tree | 09c7267e4371fd37284d7b4b0ece5a7cb0a4a05f | |
parent | 47c1017cf8b90909ea7245a110159cdecd2e6197 (diff) | |
download | podman-8c478f94f944e7cd81a38576bcb4469e1cda75a5.tar.gz podman-8c478f94f944e7cd81a38576bcb4469e1cda75a5.tar.bz2 podman-8c478f94f944e7cd81a38576bcb4469e1cda75a5.zip |
Add header to play kube output
Signed-off-by: Peter Hunt <pehunt@redhat.com>
-rw-r--r-- | cmd/podman/play_kube.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/podman/play_kube.go b/cmd/podman/play_kube.go index d15dd1393..d1008e615 100644 --- a/cmd/podman/play_kube.go +++ b/cmd/podman/play_kube.go @@ -238,7 +238,13 @@ func playKubeYAMLCmd(c *cliconfig.KubePlayValues, ctx context.Context, runtime * // We've now successfully converted this YAML into a pod // print our pod and containers, signifying we succeeded - fmt.Println(pod.ID()) + fmt.Printf("Pod:\n%s\n", pod.ID()) + if len(containers) == 1 { + fmt.Printf("Container:\n") + } + if len(containers) > 1 { + fmt.Printf("Containers:\n") + } for _, ctr := range containers { fmt.Println(ctr.ID()) } |