mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-03 13:03:04 +00:00
Synchronise vendoring with containerd v1.0.0-alpha1
Some of these are arbitrary and just syncing for the sake of it, however the
image- and runtime-spec are relevant. Interesting changes:
- runtime spec:
- LinuxRLimit is now POSIXRLimit.
- Specs.Config is now a pointer.
- LinuxResources.DisableOOMKiller moved to
LinuxResources.LinuxMemory.DisableOOMKiller
- image spec:
- Platform.Features is removed (unused here).
Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
@@ -768,7 +768,7 @@ func ConfigInspectToOCI(yaml Image, inspect types.ImageInspect, idMap map[string
|
||||
}
|
||||
|
||||
rlimitsString := assignStrings(label.Rlimits, yaml.Rlimits)
|
||||
rlimits := []specs.LinuxRlimit{}
|
||||
rlimits := []specs.POSIXRlimit{}
|
||||
for _, limitString := range rlimitsString {
|
||||
rs := strings.SplitN(limitString, ",", 3)
|
||||
var limit string
|
||||
@@ -818,7 +818,7 @@ func ConfigInspectToOCI(yaml Image, inspect types.ImageInspect, idMap map[string
|
||||
"RLIMIT_NICE",
|
||||
"RLIMIT_RTPRIO",
|
||||
"RLIMIT_RTTIME":
|
||||
rlimits = append(rlimits, specs.LinuxRlimit{Type: limit, Soft: soft, Hard: hard})
|
||||
rlimits = append(rlimits, specs.POSIXRlimit{Type: limit, Soft: soft, Hard: hard})
|
||||
default:
|
||||
return oci, fmt.Errorf("Unknown limit: %s", origLimit)
|
||||
}
|
||||
@@ -876,7 +876,7 @@ func ConfigInspectToOCI(yaml Image, inspect types.ImageInspect, idMap map[string
|
||||
// SelinuxLabel
|
||||
}
|
||||
|
||||
oci.Root = specs.Root{
|
||||
oci.Root = &specs.Root{
|
||||
Path: "rootfs",
|
||||
Readonly: readonly,
|
||||
}
|
||||
@@ -890,8 +890,15 @@ func ConfigInspectToOCI(yaml Image, inspect types.ImageInspect, idMap map[string
|
||||
Sysctl: assignMaps(label.Sysctl, yaml.Sysctl),
|
||||
Resources: &specs.LinuxResources{
|
||||
// Devices
|
||||
DisableOOMKiller: assignBoolPtr(label.DisableOOMKiller, yaml.DisableOOMKiller),
|
||||
// Memory
|
||||
Memory: &specs.LinuxMemory{
|
||||
// Limit
|
||||
// Reservation
|
||||
// Swap
|
||||
// Kernel
|
||||
// KernelTCP
|
||||
// Swappiness
|
||||
DisableOOMKiller: assignBoolPtr(label.DisableOOMKiller, yaml.DisableOOMKiller),
|
||||
},
|
||||
// CPU
|
||||
// Pids
|
||||
// BlockIO
|
||||
|
||||
Reference in New Issue
Block a user