add utility for binding flags and building api server clients

This commit is contained in:
deads2k
2014-11-17 13:29:45 -05:00
parent ff1e9f4c19
commit 2dbfb80349
16 changed files with 764 additions and 190 deletions

View File

@@ -21,7 +21,7 @@ import (
"io"
)
func NewCmdLog(out io.Writer) *cobra.Command {
func (f *Factory) NewCmdLog(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "log <pod> <container>",
Short: "Print the logs for a container in a pod",
@@ -32,7 +32,8 @@ func NewCmdLog(out io.Writer) *cobra.Command {
namespace := getKubeNamespace(cmd)
client := getKubeClient(cmd)
client, err := f.ClientBuilder.Client()
checkErr(err)
pod, err := client.Pods(namespace).Get(args[0])
checkErr(err)