Skip to content

Commit cabeea7

Browse files
committed
specs-go: mark LinuxMemory.Kernel as deprecated
Support for kernel-memory limits was deprecated in the kernel, and documented as "NOT RECOMMENDED" (or "SHOULD NOT" use) in v1.1.0-rc.1 through commit f02cd4a. This patch marks the field as deprecated in the go implementation of the spec, so that linters and editors produces a warning and consumers get notified of its status. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent c0e9043 commit cabeea7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

specs-go/config.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,12 @@ type LinuxMemory struct {
371371
// Total memory limit (memory + swap).
372372
Swap *int64 `json:"swap,omitempty"`
373373
// Kernel memory limit (in bytes).
374+
//
375+
// Deprecated: kernel-memory limits are not supported in cgroups v2, and
376+
// were obsoleted in [kernel v5.4]. This field should no longer be used,
377+
// as it may be ignored by runtimes.
378+
//
379+
// [kernel v5.4]: https://github.com/torvalds/linux/commit/0158115f702b0ba208ab0
374380
Kernel *int64 `json:"kernel,omitempty"`
375381
// Kernel memory limit for tcp (in bytes)
376382
KernelTCP *int64 `json:"kernelTCP,omitempty"`

0 commit comments

Comments
 (0)