Fix hyperkube flag parsing

hyperkube kubectl cobra subcommands now work as expected.

Add unit tests with hyperkube subcommands
This commit is contained in:
Colin Hom
2016-05-11 14:46:26 -07:00
committed by Colin Hom
parent 24c46acd16
commit fd1771e7ae
4 changed files with 94 additions and 8 deletions

View File

@@ -123,8 +123,8 @@ func (hk *HyperKube) Run(args []string) error {
command := args[0]
baseCommand := path.Base(command)
serverName := baseCommand
args = args[1:]
if serverName == hk.Name {
args = args[1:]
baseFlags := hk.Flags()
baseFlags.SetInterspersed(false) // Only parse flags up to the next real command