Merge pull request #4203 from opencontainers/dependabot/go_modules/github.com/opencontainers/runtime-spec-1.2.0

This commit is contained in:
dependabot[bot]
2024-03-09 12:18:19 +00:00
committed by GitHub
9 changed files with 32 additions and 15 deletions
+6 -5
View File
@@ -1,14 +1,15 @@
# Spec conformance # Spec conformance
This branch of runc implements the [OCI Runtime Spec v1.1.0](https://github.com/opencontainers/runtime-spec/tree/v1.1.0) This branch of runc implements the [OCI Runtime Spec v1.2.0](https://github.com/opencontainers/runtime-spec/tree/v1.2.0)
for the `linux` platform. for the `linux` platform.
The following features are not implemented yet: The following features are not implemented yet:
Spec version | Feature | PR Spec version | Feature | PR
-------------|------------------------------------------|---------------------------------------------------------- -------------|------------------------------------------------|----------------------------------------------------------
v1.1.0 | `SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV` | [#3862](https://github.com/opencontainers/runc/pull/3862) v1.1.0 | `SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV` | [#3862](https://github.com/opencontainers/runc/pull/3862)
v1.1.0 | `.process.ioPriority` | [#3783](https://github.com/opencontainers/runc/pull/3783) v1.1.0 | `.process.ioPriority` | [#3783](https://github.com/opencontainers/runc/pull/3783)
v1.2.0 | Features: `potentiallyUnsafeConfigAnnotations` | TODO
## Architectures ## Architectures
+1 -1
View File
@@ -13,7 +13,7 @@ require (
github.com/moby/sys/mountinfo v0.7.1 github.com/moby/sys/mountinfo v0.7.1
github.com/moby/sys/user v0.1.0 github.com/moby/sys/user v0.1.0
github.com/mrunalp/fileutils v0.5.1 github.com/mrunalp/fileutils v0.5.1
github.com/opencontainers/runtime-spec v1.1.1-0.20230823135140-4fec88fd00a4 github.com/opencontainers/runtime-spec v1.2.0
github.com/opencontainers/selinux v1.11.0 github.com/opencontainers/selinux v1.11.0
github.com/seccomp/libseccomp-golang v0.10.0 github.com/seccomp/libseccomp-golang v0.10.0
github.com/sirupsen/logrus v1.9.3 github.com/sirupsen/logrus v1.9.3
+2 -2
View File
@@ -32,8 +32,8 @@ github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg=
github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU=
github.com/mrunalp/fileutils v0.5.1 h1:F+S7ZlNKnrwHfSwdlgNSkKo67ReVf8o9fel6C3dkm/Q= github.com/mrunalp/fileutils v0.5.1 h1:F+S7ZlNKnrwHfSwdlgNSkKo67ReVf8o9fel6C3dkm/Q=
github.com/mrunalp/fileutils v0.5.1/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mrunalp/fileutils v0.5.1/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
github.com/opencontainers/runtime-spec v1.1.1-0.20230823135140-4fec88fd00a4 h1:EctkgBjZ1y4q+sibyuuIgiKpa0QSd2elFtSSdNvBVow= github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk=
github.com/opencontainers/runtime-spec v1.1.1-0.20230823135140-4fec88fd00a4/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU=
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+2 -2
View File
@@ -791,7 +791,7 @@ func CreateCgroupConfig(opts *CreateOpts, defaultDevs []*devices.Device) (*confi
if r.Memory.Swap != nil { if r.Memory.Swap != nil {
c.Resources.MemorySwap = *r.Memory.Swap c.Resources.MemorySwap = *r.Memory.Swap
} }
if r.Memory.Kernel != nil || r.Memory.KernelTCP != nil { if r.Memory.Kernel != nil || r.Memory.KernelTCP != nil { //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.
logrus.Warn("Kernel memory settings are ignored and will be removed") logrus.Warn("Kernel memory settings are ignored and will be removed")
} }
if r.Memory.Swappiness != nil { if r.Memory.Swappiness != nil {
@@ -1207,7 +1207,7 @@ func SetupSeccomp(config *specs.LinuxSeccomp) (*configs.Seccomp, error) {
func createHooks(rspec *specs.Spec, config *configs.Config) { func createHooks(rspec *specs.Spec, config *configs.Config) {
config.Hooks = configs.Hooks{} config.Hooks = configs.Hooks{}
if rspec.Hooks != nil { if rspec.Hooks != nil {
for _, h := range rspec.Hooks.Prestart { for _, h := range rspec.Hooks.Prestart { //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.
cmd := createCommandHook(h) cmd := createCommandHook(h)
config.Hooks[configs.Prestart] = append(config.Hooks[configs.Prestart], configs.NewCommandHook(cmd)) config.Hooks[configs.Prestart] = append(config.Hooks[configs.Prestart], configs.NewCommandHook(cmd))
} }
+2 -2
View File
@@ -250,7 +250,7 @@ other options are ignored.
}{ }{
{"memory", r.Memory.Limit}, {"memory", r.Memory.Limit},
{"memory-swap", r.Memory.Swap}, {"memory-swap", r.Memory.Swap},
{"kernel-memory", r.Memory.Kernel}, {"kernel-memory", r.Memory.Kernel}, //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.
{"kernel-memory-tcp", r.Memory.KernelTCP}, {"kernel-memory-tcp", r.Memory.KernelTCP},
{"memory-reservation", r.Memory.Reservation}, {"memory-reservation", r.Memory.Reservation},
} { } {
@@ -272,7 +272,7 @@ other options are ignored.
r.Pids.Limit = int64(context.Int("pids-limit")) r.Pids.Limit = int64(context.Int("pids-limit"))
} }
if *r.Memory.Kernel != 0 || *r.Memory.KernelTCP != 0 { if *r.Memory.Kernel != 0 || *r.Memory.KernelTCP != 0 { //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.
logrus.Warn("Kernel memory settings are ignored and will be removed") logrus.Warn("Kernel memory settings are ignored and will be removed")
} }
+10
View File
@@ -187,6 +187,10 @@ type Hook struct {
type Hooks struct { type Hooks struct {
// Prestart is Deprecated. Prestart is a list of hooks to be run before the container process is executed. // Prestart is Deprecated. Prestart is a list of hooks to be run before the container process is executed.
// It is called in the Runtime Namespace // It is called in the Runtime Namespace
//
// Deprecated: use [Hooks.CreateRuntime], [Hooks.CreateContainer], and
// [Hooks.StartContainer] instead, which allow more granular hook control
// during the create and start phase.
Prestart []Hook `json:"prestart,omitempty"` Prestart []Hook `json:"prestart,omitempty"`
// CreateRuntime is a list of hooks to be run after the container has been created but before pivot_root or any equivalent operation has been called // CreateRuntime is a list of hooks to be run after the container has been created but before pivot_root or any equivalent operation has been called
// It is called in the Runtime Namespace // It is called in the Runtime Namespace
@@ -371,6 +375,12 @@ type LinuxMemory struct {
// Total memory limit (memory + swap). // Total memory limit (memory + swap).
Swap *int64 `json:"swap,omitempty"` Swap *int64 `json:"swap,omitempty"`
// Kernel memory limit (in bytes). // Kernel memory limit (in bytes).
//
// Deprecated: kernel-memory limits are not supported in cgroups v2, and
// were obsoleted in [kernel v5.4]. This field should no longer be used,
// as it may be ignored by runtimes.
//
// [kernel v5.4]: https://github.com/torvalds/linux/commit/0158115f702b0ba208ab0
Kernel *int64 `json:"kernel,omitempty"` Kernel *int64 `json:"kernel,omitempty"`
// Kernel memory limit for tcp (in bytes) // Kernel memory limit for tcp (in bytes)
KernelTCP *int64 `json:"kernelTCP,omitempty"` KernelTCP *int64 `json:"kernelTCP,omitempty"`
@@ -24,6 +24,12 @@ type Features struct {
// Annotations contains implementation-specific annotation strings, // Annotations contains implementation-specific annotation strings,
// such as the implementation version, and third-party extensions. // such as the implementation version, and third-party extensions.
Annotations map[string]string `json:"annotations,omitempty"` Annotations map[string]string `json:"annotations,omitempty"`
// PotentiallyUnsafeConfigAnnotations the list of the potential unsafe annotations
// that may appear in `config.json`.
//
// A value that ends with "." is interpreted as a prefix of annotations.
PotentiallyUnsafeConfigAnnotations []string `json:"potentiallyUnsafeConfigAnnotations,omitempty"`
} }
// Linux is specific to Linux. // Linux is specific to Linux.
+2 -2
View File
@@ -6,12 +6,12 @@ const (
// VersionMajor is for an API incompatible changes // VersionMajor is for an API incompatible changes
VersionMajor = 1 VersionMajor = 1
// VersionMinor is for functionality in a backwards-compatible manner // VersionMinor is for functionality in a backwards-compatible manner
VersionMinor = 1 VersionMinor = 2
// VersionPatch is for backwards-compatible bug fixes // VersionPatch is for backwards-compatible bug fixes
VersionPatch = 0 VersionPatch = 0
// VersionDev indicates development branch. Releases will be empty string. // VersionDev indicates development branch. Releases will be empty string.
VersionDev = "+dev" VersionDev = ""
) )
// Version is the specification version that the package types support. // Version is the specification version that the package types support.
+1 -1
View File
@@ -42,7 +42,7 @@ github.com/moby/sys/user
# github.com/mrunalp/fileutils v0.5.1 # github.com/mrunalp/fileutils v0.5.1
## explicit; go 1.13 ## explicit; go 1.13
github.com/mrunalp/fileutils github.com/mrunalp/fileutils
# github.com/opencontainers/runtime-spec v1.1.1-0.20230823135140-4fec88fd00a4 # github.com/opencontainers/runtime-spec v1.2.0
## explicit ## explicit
github.com/opencontainers/runtime-spec/specs-go github.com/opencontainers/runtime-spec/specs-go
github.com/opencontainers/runtime-spec/specs-go/features github.com/opencontainers/runtime-spec/specs-go/features