Fix pod exec options

Change the command field to an array of strings.
This commit is contained in:
Cesar Wong
2015-05-04 16:21:03 -04:00
parent 1b7749b8d9
commit 283049f679
8 changed files with 37 additions and 15 deletions

View File

@@ -1715,7 +1715,12 @@ func init() {
out.Stderr = in.Stderr
out.TTY = in.TTY
out.Container = in.Container
out.Command = in.Command
if in.Command != nil {
out.Command = make([]string, len(in.Command))
for i := range in.Command {
out.Command[i] = in.Command[i]
}
}
return nil
},
func(in *newer.PodExecOptions, out *PodExecOptions, s conversion.Scope) error {
@@ -1727,7 +1732,12 @@ func init() {
out.Stderr = in.Stderr
out.TTY = in.TTY
out.Container = in.Container
out.Command = in.Command
if in.Command != nil {
out.Command = make([]string, len(in.Command))
for i := range in.Command {
out.Command[i] = in.Command[i]
}
}
return nil
},
func(in *PodList, out *newer.PodList, s conversion.Scope) error {

View File

@@ -1339,8 +1339,8 @@ type PodExecOptions struct {
// Container in which to execute the command.
Container string `json:"container,omitempty" description:"the container in which to execute the command. Defaults to only container if there is only one container in the pod."`
// Command is the remote command to execute
Command string `json:"command" description:"the command to execute"`
// Command is the remote command to execute; argv array; not executed within a shell.
Command []string `json:"command" description:"the command to execute; argv array; not executed within a shell"`
}
// PodProxyOptions is the query options to a Pod's proxy call