Skip to content

Commit 4a910f0

Browse files
Merge pull request #550 from Mashimiao/add-devicecgroup-and-devices
add devices for resources and DeviceCgroup
2 parents 5391715 + 60672c0 commit 4a910f0

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

schema/config-linux.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,20 @@
6161
"id": "https://opencontainers.org/schema/bundle/linux/resources",
6262
"type": "object",
6363
"properties": {
64+
"devices": {
65+
"id": "https://opencontainers.org/schema/bundle/linux/resources/devices",
66+
"oneOf": [
67+
{
68+
"type": "array",
69+
"items": {
70+
"$ref": "defs-linux.json#/definitions/DeviceCgroup"
71+
}
72+
},
73+
{
74+
"type": "null"
75+
}
76+
]
77+
},
6478
"oomScoreAdj": {
6579
"id": "https://opencontainers.org/schema/bundle/linux/resources/oomScoreAdj",
6680
"type": "integer",

schema/defs-linux.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,40 @@
217217
}
218218
]
219219
},
220+
"DeviceCgroup": {
221+
"type": "object",
222+
"properties": {
223+
"allow": {
224+
"type": "boolean"
225+
},
226+
"type": {
227+
"$ref": "defs.json#/definitions/stringPointer"
228+
},
229+
"major": {
230+
"oneOf": [
231+
{
232+
"$ref": "#/definitions/Major"
233+
},
234+
{
235+
"type": "null"
236+
}
237+
]
238+
},
239+
"minor": {
240+
"oneOf": [
241+
{
242+
"$ref": "#/definitions/Minor"
243+
},
244+
{
245+
"type": "null"
246+
}
247+
]
248+
},
249+
"access": {
250+
"$ref": "defs.json#/definitions/stringPointer"
251+
}
252+
}
253+
},
220254
"NetworkInterfacePriority": {
221255
"type": "object",
222256
"properties": {

0 commit comments

Comments
 (0)