Fix pod exec options
Change the command field to an array of strings.
This commit is contained in:
@@ -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 {
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user