Add interactive run that combines run and attach.

This commit is contained in:
Brendan Burns
2015-08-04 12:54:17 -07:00
parent d04fce045e
commit 9ac50b4980
15 changed files with 162 additions and 15 deletions

View File

@@ -35,6 +35,8 @@ func (BasicReplicationController) ParamNames() []GeneratorParam {
{"image", true},
{"port", false},
{"hostport", false},
{"stdin", false},
{"tty", false},
}
}
@@ -64,6 +66,16 @@ func (BasicReplicationController) Generate(params map[string]string) (runtime.Ob
if err != nil {
return nil, err
}
stdin, err := GetBool(params, "stdin", false)
if err != nil {
return nil, err
}
tty, err := GetBool(params, "tty", false)
if err != nil {
return nil, err
}
controller := api.ReplicationController{
ObjectMeta: api.ObjectMeta{
Name: name,
@@ -81,6 +93,8 @@ func (BasicReplicationController) Generate(params map[string]string) (runtime.Ob
{
Name: name,
Image: params["image"],
Stdin: stdin,
TTY: tty,
},
},
},