@@ -86,6 +86,8 @@ func NewCmdExec(f cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *c
86
86
cmd .Flags ().StringVarP (& options .PodName , "pod" , "p" , "" , "Pod name" )
87
87
// TODO support UID
88
88
cmd .Flags ().StringVarP (& options .ContainerName , "container" , "c" , "" , "Container name. If omitted, the first container in the pod will be chosen" )
89
+ cmd .Flags ().StringVarP (& options .DebugName , "debug" , "d" , "" , "Debug Container name." )
90
+ cmd .Flags ().StringVarP (& options .DebugImage , "image" , "m" , "" , "Debug Container image." )
89
91
cmd .Flags ().BoolVarP (& options .Stdin , "stdin" , "i" , false , "Pass stdin to the container" )
90
92
cmd .Flags ().BoolVarP (& options .TTY , "tty" , "t" , false , "Stdin is a TTY" )
91
93
return cmd
@@ -136,7 +138,9 @@ type StreamOptions struct {
136
138
type ExecOptions struct {
137
139
StreamOptions
138
140
139
- Command []string
141
+ Command []string
142
+ DebugName string
143
+ DebugImage string
140
144
141
145
FullCmdName string
142
146
SuggestedCmdUsage string
@@ -314,12 +318,14 @@ func (p *ExecOptions) Run() error {
314
318
SubResource ("exec" ).
315
319
Param ("container" , containerName )
316
320
req .VersionedParams (& api.PodExecOptions {
317
- Container : containerName ,
318
- Command : p .Command ,
319
- Stdin : p .Stdin ,
320
- Stdout : p .Out != nil ,
321
- Stderr : p .Err != nil ,
322
- TTY : t .Raw ,
321
+ Container : containerName ,
322
+ Command : p .Command ,
323
+ Stdin : p .Stdin ,
324
+ Stdout : p .Out != nil ,
325
+ Stderr : p .Err != nil ,
326
+ TTY : t .Raw ,
327
+ AlphaName : p .DebugName ,
328
+ AlphaImage : p .DebugImage ,
323
329
}, api .ParameterCodec )
324
330
325
331
return p .Executor .Execute ("POST" , req .URL (), p .Config , p .In , p .Out , p .Err , t .Raw , sizeQueue )
0 commit comments