Skip to content

Commit fae90c1

Browse files
committed
schema: updates and fixes
Several fields needed the correct typing, and updates for recent changes. Signed-off-by: Vincent Batts <[email protected]>
1 parent 81b865d commit fae90c1

File tree

3 files changed

+50
-36
lines changed

3 files changed

+50
-36
lines changed

schema/defs-linux.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@
9393
"type": "string"
9494
},
9595
"FileType": {
96-
"type": "integer"
96+
"description": "Type of a block or special character device",
97+
"type": "string",
98+
"pattern": "^[c|b|u|p]$"
9799
},
98100
"Device": {
99101
"properties": {

schema/schema-linux.json

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@
6161
"id": "https://opencontainers.org/schema/bundle/linux/resources",
6262
"type": "object",
6363
"properties": {
64+
"pids": {
65+
"id": "https://opencontainers.org/schema/bundle/linux/resources/pids",
66+
"properties": {
67+
"limit": {
68+
"id": "https://opencontainers.org/schema/bundle/linux/resources/pids/limit",
69+
"$ref": "defs.json#/definitions/int64"
70+
}
71+
}
72+
},
6473
"blockIO": {
6574
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO",
6675
"type": "object",
@@ -190,13 +199,16 @@
190199
"id": "https://opencontainers.org/schema/bundle/linux/resources/hugepageLimits",
191200
"oneOf": [
192201
{
193-
"type": "object",
194-
"properties": {
195-
"pageSize": {
196-
"type": "string"
197-
},
198-
"limit": {
199-
"$ref": "defs.json#/definitions/uint64"
202+
"type": "array",
203+
"items": {
204+
"type": "object",
205+
"properties": {
206+
"pageSize": {
207+
"type": "string"
208+
},
209+
"limit": {
210+
"$ref": "defs.json#/definitions/uint64"
211+
}
200212
}
201213
}
202214
},
@@ -235,9 +247,9 @@
235247
"id": "https://opencontainers.org/schema/bundle/linux/resources/network",
236248
"type": "object",
237249
"properties": {
238-
"classId": {
250+
"classID": {
239251
"id": "https://opencontainers.org/schema/bundle/linux/resources/network/classId",
240-
"type": "string"
252+
"$ref": "defs.json#/definitions/uint32"
241253
},
242254
"priorities": {
243255
"id": "https://opencontainers.org/schema/bundle/linux/resources/network/priorities",
@@ -257,31 +269,6 @@
257269
}
258270
}
259271
},
260-
"rlimits": {
261-
"id": "https://opencontainers.org/schema/bundle/linux/rlimits",
262-
"items": [
263-
{
264-
"id": "https://opencontainers.org/schema/bundle/linux/rlimits/0",
265-
"properties": {
266-
"hard": {
267-
"id": "https://opencontainers.org/schema/bundle/linux/rlimits/0/hard",
268-
"type": "integer"
269-
},
270-
"soft": {
271-
"id": "https://opencontainers.org/schema/bundle/linux/rlimits/0/soft",
272-
"type": "integer"
273-
},
274-
"type": {
275-
"id": "https://opencontainers.org/schema/bundle/linux/rlimits/0/type",
276-
"type": "string",
277-
"pattern": "^RLIMIT_[A-Z]+$"
278-
}
279-
},
280-
"type": "object"
281-
}
282-
],
283-
"type": "array"
284-
},
285272
"cgroupsPath": {
286273
"oneOf": [
287274
{

schema/schema.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
}
2626
},
2727
"annotations": {
28-
"id": "https://opencontainers.org/schema/bundle/linux/sysctl",
28+
"id": "https://opencontainers.org/schema/bundle/annotations",
2929
"oneOf": [
3030
{
3131
"$ref": "defs.json#/definitions/mapStringString"
@@ -139,6 +139,31 @@
139139
"noNewPrivileges": {
140140
"id": "https://opencontainers.org/schema/bundle/process/linux/noNewPrivileges",
141141
"type": "boolean"
142+
},
143+
"rlimits": {
144+
"id": "https://opencontainers.org/schema/bundle/linux/rlimits",
145+
"type": "array",
146+
"items": [
147+
{
148+
"id": "https://opencontainers.org/schema/bundle/linux/rlimits/0",
149+
"type": "object",
150+
"properties": {
151+
"hard": {
152+
"id": "https://opencontainers.org/schema/bundle/linux/rlimits/0/hard",
153+
"$ref": "defs.json#/definitions/uint64"
154+
},
155+
"soft": {
156+
"id": "https://opencontainers.org/schema/bundle/linux/rlimits/0/soft",
157+
"$ref": "defs.json#/definitions/uint64"
158+
},
159+
"type": {
160+
"id": "https://opencontainers.org/schema/bundle/linux/rlimits/0/type",
161+
"type": "string",
162+
"pattern": "^RLIMIT_[A-Z]+$"
163+
}
164+
}
165+
}
166+
]
142167
}
143168
}
144169
},

0 commit comments

Comments
 (0)