diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-11 08:53:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-11 08:53:00 -0400 |
commit | b62e50f53b9e65c86e877bb931fa53602eba53c7 (patch) | |
tree | e1e90e90f67c22c7fabe1f426ce9a3e512627675 /cmd/podman | |
parent | 09e4faa7dfa99719d67039a9e39bebb5376d9ecb (diff) | |
parent | 162c1d812bd875a015c428119eac7fbabbe6c8ff (diff) | |
download | podman-b62e50f53b9e65c86e877bb931fa53602eba53c7.tar.gz podman-b62e50f53b9e65c86e877bb931fa53602eba53c7.tar.bz2 podman-b62e50f53b9e65c86e877bb931fa53602eba53c7.zip |
Merge pull request #6256 from theunrealgeek/play_kube_deployment
Support k8s Deployment in play kube
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/play/kube.go | 34 |
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 |