mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
4b49c64a88
The only discussion related to this is in [1,2], where the relationship between oomScoreAdj and disableOOMKiller is raised. But since429f936(Adding cgroups path to the Spec, 2015-09-02, #137) resources has been tied to cgroups, and oomScoreAdj is not about cgroups. For example, we currently have (in config-linux.md): You can configure a container's cgroups via the resources field of the Linux configuration. I suggested we move the property from linux.resources.oomScoreAdj to linux.oomScoreAdj so config authors and runtimes don't have to worry about what cgroupsPath means if the only entry in resources is oomScoreAdj. Michael responded with [4]: If anything it should probably go on the process So that's what this commit does. I've gone with the four-space indents here to keep Pandoc happy (see7795661(runtime.md: Fix sub-bullet indentation, 2016-06-08, #495), but have left the existing entries in this list unchanged to reduce churn. [1]: https://github.com/opencontainers/runtime-spec/pull/236 [2]: https://github.com/opencontainers/runtime-spec/pull/292 [3]: https://github.com/opencontainers/runtime-spec/pull/137 [4]: https://github.com/opencontainers/runtime-spec/issues/782#issuecomment-299990075 Signed-off-by: W. Trevor King <wking@tremily.us>
272 lines
13 KiB
JSON
272 lines
13 KiB
JSON
{
|
|
"linux": {
|
|
"description": "Linux platform-specific configurations",
|
|
"id": "https://opencontainers.org/schema/bundle/linux",
|
|
"type": "object",
|
|
"properties": {
|
|
"devices": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/devices",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "defs-linux.json#/definitions/Device"
|
|
}
|
|
},
|
|
"uidMappings": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/uidMappings",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "defs.json#/definitions/IDMapping"
|
|
}
|
|
},
|
|
"gidMappings": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/gidMappings",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "defs.json#/definitions/IDMapping"
|
|
}
|
|
},
|
|
"namespaces": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/namespaces",
|
|
"type": "array",
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "defs-linux.json#/definitions/NamespaceReference"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"resources": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources",
|
|
"type": "object",
|
|
"properties": {
|
|
"devices": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/devices",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "defs-linux.json#/definitions/DeviceCgroup"
|
|
}
|
|
},
|
|
"pids": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/pids",
|
|
"type": "object",
|
|
"properties": {
|
|
"limit": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/pids/limit",
|
|
"$ref": "defs.json#/definitions/int64"
|
|
}
|
|
},
|
|
"required": [
|
|
"limit"
|
|
]
|
|
},
|
|
"blockIO": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO",
|
|
"type": "object",
|
|
"properties": {
|
|
"blkioWeight": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioWeight",
|
|
"$ref": "defs-linux.json#/definitions/blkioWeight"
|
|
},
|
|
"blkioLeafWeight": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioLeafWeight",
|
|
"$ref": "defs-linux.json#/definitions/blkioWeight"
|
|
},
|
|
"blkioThrottleReadBpsDevice": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleReadBpsDevice",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
|
|
}
|
|
},
|
|
"blkioThrottleWriteBpsDevice": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleWriteBpsDevice",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
|
|
}
|
|
},
|
|
"blkioThrottleReadIopsDevice": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleReadIopsDevice",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
|
|
}
|
|
},
|
|
"blkioThrottleWriteIopsDevice": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleWriteIopsDevice",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
|
|
}
|
|
},
|
|
"blkioWeightDevice": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioWeightDevice",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "defs-linux.json#/definitions/blockIODeviceWeight"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"cpu": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu",
|
|
"type": "object",
|
|
"properties": {
|
|
"cpus": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/cpus",
|
|
"type": "string"
|
|
},
|
|
"mems": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/mems",
|
|
"type": "string"
|
|
},
|
|
"period": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/period",
|
|
"$ref": "defs.json#/definitions/uint64"
|
|
},
|
|
"quota": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/quota",
|
|
"$ref": "defs.json#/definitions/int64"
|
|
},
|
|
"realtimePeriod": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/realtimePeriod",
|
|
"$ref": "defs.json#/definitions/uint64"
|
|
},
|
|
"realtimeRuntime": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/realtimeRuntime",
|
|
"$ref": "defs.json#/definitions/int64"
|
|
},
|
|
"shares": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/shares",
|
|
"$ref": "defs.json#/definitions/uint64"
|
|
}
|
|
}
|
|
},
|
|
"disableOOMKiller": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/disableOOMKiller",
|
|
"type": "boolean"
|
|
},
|
|
"hugepageLimits": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/hugepageLimits",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"pageSize": {
|
|
"type": "string"
|
|
},
|
|
"limit": {
|
|
"$ref": "defs.json#/definitions/uint64"
|
|
}
|
|
},
|
|
"required": [
|
|
"pageSize",
|
|
"limit"
|
|
]
|
|
}
|
|
},
|
|
"memory": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory",
|
|
"type": "object",
|
|
"properties": {
|
|
"kernel": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/kernel",
|
|
"$ref": "defs.json#/definitions/uint64"
|
|
},
|
|
"kernelTCP": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/kernelTCP",
|
|
"$ref": "defs.json#/definitions/uint64"
|
|
},
|
|
"limit": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/limit",
|
|
"$ref": "defs.json#/definitions/uint64"
|
|
},
|
|
"reservation": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/reservation",
|
|
"$ref": "defs.json#/definitions/uint64"
|
|
},
|
|
"swap": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swap",
|
|
"$ref": "defs.json#/definitions/uint64"
|
|
},
|
|
"swappiness": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swappiness",
|
|
"$ref": "defs.json#/definitions/uint64"
|
|
}
|
|
}
|
|
},
|
|
"network": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/network",
|
|
"type": "object",
|
|
"properties": {
|
|
"classID": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/network/classId",
|
|
"$ref": "defs.json#/definitions/uint32"
|
|
},
|
|
"priorities": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/network/priorities",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "defs-linux.json#/definitions/NetworkInterfacePriority"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"cgroupsPath": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/cgroupsPath",
|
|
"type": "string"
|
|
},
|
|
"rootfsPropagation": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/rootfsPropagation",
|
|
"$ref": "defs-linux.json#/definitions/RootfsPropagation"
|
|
},
|
|
"seccomp": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/seccomp",
|
|
"type": "object",
|
|
"properties": {
|
|
"defaultAction": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/seccomp/defaultAction",
|
|
"type": "string"
|
|
},
|
|
"architectures": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/seccomp/architectures",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "defs-linux.json#/definitions/SeccompArch"
|
|
}
|
|
},
|
|
"syscalls": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/seccomp/syscalls",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "defs-linux.json#/definitions/Syscall"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"defaultAction"
|
|
]
|
|
},
|
|
"sysctl": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/sysctl",
|
|
"$ref": "defs.json#/definitions/mapStringString"
|
|
},
|
|
"maskedPaths": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/maskedPaths",
|
|
"$ref": "defs.json#/definitions/ArrayOfStrings"
|
|
},
|
|
"readonlyPaths": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/readonlyPaths",
|
|
"$ref": "defs.json#/definitions/ArrayOfStrings"
|
|
},
|
|
"mountLabel": {
|
|
"id": "https://opencontainers.org/schema/bundle/linux/mountLabel",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|