Merge pull request #1149 from weiwei04/share_pid_namespace

share pid namespace for Pod container
This commit is contained in:
Mrunal Patel 2017-11-17 08:12:49 -10:00 committed by GitHub
commit d68da8929a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 96 additions and 2 deletions

View file

@ -115,6 +115,9 @@ default_mounts = [
# pids_limit is the number of processes allowed in a container
pids_limit = {{ .PidsLimit }}
# disable using a shared PID namespace for containers in a pod
disable_shared_pid_namespace = {{ .DisableSharedPIDNamespace }}
# log_size_max is the max limit for the container log size in bytes.
# Negative values indicate that no limit is imposed.
log_size_max = {{ .LogSizeMax }}

View file

@ -132,6 +132,9 @@ func mergeConfig(config *server.Config, ctx *cli.Context) error {
if ctx.GlobalIsSet("pids-limit") {
config.PidsLimit = ctx.GlobalInt64("pids-limit")
}
if ctx.GlobalIsSet("disable-shared-pid-namespace") {
config.DisableSharedPIDNamespace = ctx.GlobalBool("disable-shared-pid-namespace")
}
if ctx.GlobalIsSet("log-size-max") {
config.LogSizeMax = ctx.GlobalInt64("log-size-max")
}
@ -297,6 +300,10 @@ func main() {
Value: libkpod.DefaultPidsLimit,
Usage: "maximum number of processes allowed in a container",
},
cli.BoolFlag{
Name: "disable-shared-pid-namespace",
Usage: "disable using a shared PID namespace for containers in a pod",
},
cli.Int64Flag{
Name: "log-size-max",
Value: libkpod.DefaultLogSizeMax,