Merge pull request #20233 from yifan-gu/rkt_fix_user_group

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot
2016-02-02 08:47:08 -08:00
2 changed files with 21 additions and 6 deletions

View File

@@ -434,6 +434,17 @@ func setApp(app *appctypes.App, c *api.Container, opts *kubecontainer.RunContain
}
setSupplementaryGIDs(app, podCtx)
// If 'User' or 'Group' are still empty at this point,
// then apply the root UID and GID.
// TODO(yifan): Instead of using root GID, we should use
// the GID which the user is in.
if app.User == "" {
app.User = "0"
}
if app.Group == "" {
app.Group = "0"
}
// Set working directory.
if len(c.WorkingDir) > 0 {
app.WorkingDirectory = c.WorkingDir