config-linux: Make linux.resources.devices explicitly optional
And mark it omitempty to avoid: $ ocitools generate --template <(echo '{"linux": {"resources": {}}}') | jq .linux { "resources": { "devices": null } } Signed-off-by: W. Trevor King <wking@tremily.us>
This commit is contained in:
parent
60fff3f51c
commit
054d2df15a
|
@ -198,7 +198,7 @@ However, a runtime MAY attach the container process to additional cgroup control
|
|||
|
||||
#### Device whitelist
|
||||
|
||||
`devices` is an array of entries to control the [device whitelist][cgroup-v1-devices].
|
||||
**`devices`** (array, optional) configures the [device whitelist][cgroup-v1-devices].
|
||||
The runtime MUST apply entries in the listed order.
|
||||
|
||||
The following parameters can be specified:
|
||||
|
|
|
@ -301,8 +301,8 @@ type Network struct {
|
|||
|
||||
// Resources has container runtime resource constraints
|
||||
type Resources struct {
|
||||
// Devices are a list of device rules for the whitelist controller
|
||||
Devices []DeviceCgroup `json:"devices"`
|
||||
// Devices configures the device whitelist.
|
||||
Devices []DeviceCgroup `json:"devices,omitempty"`
|
||||
// DisableOOMKiller disables the OOM killer for out of memory conditions
|
||||
DisableOOMKiller *bool `json:"disableOOMKiller,omitempty"`
|
||||
// Specify an oom_score_adj for the container.
|
||||
|
|
Loading…
Reference in New Issue