1
0
mirror of https://github.com/rancher/os.git synced 2025-09-28 14:05:03 +00:00

Bump libcompose to version with oom_score_adj support

This commit is contained in:
Olli Janatuinen
2020-12-19 19:06:46 +02:00
parent 4866d88d0c
commit bb62c58b2b
4 changed files with 5 additions and 1 deletions

View File

@@ -357,6 +357,7 @@ var schemaV2 = `{
}
]
},
"oom_score_adj": {"type": "integer", "minimum": -1000, "maximum": 1000},
"pid": {"type": ["string", "null"]},
"ports": {

View File

@@ -46,6 +46,7 @@ type ServiceConfigV1 struct {
MemSwapLimit int64 `yaml:"memswap_limit,omitempty"`
Name string `yaml:"name,omitempty"`
Net string `yaml:"net,omitempty"`
OomScoreAdj int `yaml:"oom_score_adj,omitempty"`
Pid string `yaml:"pid,omitempty"`
Uts string `yaml:"uts,omitempty"`
Ipc string `yaml:"ipc,omitempty"`
@@ -115,6 +116,7 @@ type ServiceConfig struct {
MemSwapLimit int64 `yaml:"memswap_limit,omitempty"`
NetworkMode string `yaml:"network_mode,omitempty"`
Networks []string `yaml:"networks,omitempty"`
OomScoreAdj int `yaml:"oom_score_adj,omitempty"`
Pid string `yaml:"pid,omitempty"`
Ports []string `yaml:"ports,omitempty"`
Privileged bool `yaml:"privileged,omitempty"`

View File

@@ -192,6 +192,7 @@ func Convert(c *config.ServiceConfig, ctx project.Context) (*container.Config, *
},
NetworkMode: container.NetworkMode(c.NetworkMode),
ReadonlyRootfs: c.ReadOnly,
OomScoreAdj: c.OomScoreAdj,
PidMode: container.PidMode(c.Pid),
UTSMode: container.UTSMode(c.Uts),
IpcMode: container.IpcMode(c.Ipc),