Skip to content

Commit

Permalink
Add sysctls support
Browse files Browse the repository at this point in the history
Adds support for sysctl options to the container spec. This is
equivalent to the --sysctl flag on `docker run`.

Only API changes are required for swarmkit. All of the other changes
involving plumbing through these options happens downstream in the
engine.

Signed-off-by: Drew Erny <drew.erny@docker.com>
  • Loading branch information
dperny committed Aug 22, 2018
1 parent cfa742c commit 0e685ac
Show file tree
Hide file tree
Showing 3 changed files with 367 additions and 145 deletions.
46 changes: 37 additions & 9 deletions api/api.pb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2491,8 +2491,8 @@ file {
label: LABEL_OPTIONAL
type: TYPE_UINT32
options {
65001: 0
65003: "os.FileMode"
65001: 0
}
json_name: "mode"
}
Expand Down Expand Up @@ -2639,8 +2639,8 @@ file {
type: TYPE_MESSAGE
type_name: ".google.protobuf.Duration"
options {
65001: 0
65011: 1
65001: 0
}
json_name: "delay"
}
Expand Down Expand Up @@ -3083,8 +3083,8 @@ file {
}
}
options {
62001: 0
62023: "PublishMode"
62001: 0
}
}
}
Expand Down Expand Up @@ -3783,8 +3783,8 @@ file {
label: LABEL_OPTIONAL
type: TYPE_UINT32
options {
65001: 0
65003: "os.FileMode"
65001: 0
}
json_name: "mode"
}
Expand Down Expand Up @@ -4200,8 +4200,8 @@ file {
}
}
options {
62001: 0
62023: "NodeRole"
62001: 0
}
}
syntax: "proto3"
Expand Down Expand Up @@ -4861,6 +4861,14 @@ file {
type: TYPE_INT64
json_name: "pidsLimit"
}
field {
name: "sysctls"
number: 26
label: LABEL_REPEATED
type: TYPE_MESSAGE
type_name: ".docker.swarmkit.v1.ContainerSpec.SysctlsEntry"
json_name: "sysctls"
}
nested_type {
name: "LabelsEntry"
field {
Expand Down Expand Up @@ -4915,6 +4923,26 @@ file {
json_name: "options"
}
}
nested_type {
name: "SysctlsEntry"
field {
name: "key"
number: 1
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "key"
}
field {
name: "value"
number: 2
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "value"
}
options {
map_entry: true
}
}
enum_type {
name: "Isolation"
value {
Expand Down Expand Up @@ -8023,8 +8051,8 @@ file {
type: TYPE_MESSAGE
type_name: ".google.protobuf.Duration"
options {
65001: 0
65011: 1
65001: 0
}
json_name: "period"
}
Expand Down Expand Up @@ -9071,11 +9099,11 @@ file {
}
}
options {
63001: 0
63002: 0
63017: 1
63018: 1
63020: 1
63018: 1
63001: 0
63002: 0
}
}
file {
Expand Down
Loading

0 comments on commit 0e685ac

Please sign in to comment.