Skip to content

Commit 52b0e19

Browse files
author
Ma Shimiao
committed
schema/config-linux: add min/max limit for resource memory and cpu
Signed-off-by: Ma Shimiao <[email protected]>
1 parent 55704a2 commit 52b0e19

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

schema/config-linux.json

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,28 @@
170170
},
171171
"period": {
172172
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/period",
173-
"$ref": "defs.json#/definitions/uint64Pointer"
173+
"oneOf": [
174+
{
175+
"type": "integer",
176+
"minimum": 1000,
177+
"maximum": 1000000
178+
},
179+
{
180+
"type": "null"
181+
}
182+
]
174183
},
175184
"quota": {
176185
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/quota",
177-
"$ref": "defs.json#/definitions/uint64Pointer"
186+
"oneOf": [
187+
{
188+
"type": "integer",
189+
"minimum": 1000
190+
},
191+
{
192+
"type": "null"
193+
}
194+
]
178195
},
179196
"realtimePeriod": {
180197
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/realtimePeriod",
@@ -239,7 +256,16 @@
239256
},
240257
"swappiness": {
241258
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swappiness",
242-
"$ref": "defs.json#/definitions/uint64Pointer"
259+
"oneOf": [
260+
{
261+
"type": "integer",
262+
"minimum": 0,
263+
"maximum": 100
264+
},
265+
{
266+
"type": "null"
267+
}
268+
]
243269
}
244270
}
245271
},

0 commit comments

Comments
 (0)