lcr/0004-add-cgroup-resources-json-schema-for-isula-update.patch
zhangxiaoyu 6b33e5d83a support update resources, remote-layer and files limit
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
(cherry picked from commit 7249c049dddead13dabcf736434186dbf511fff1)
2023-04-25 11:48:49 +08:00

101 lines
3.3 KiB
Diff

From 3f1ef0eeb7fe469bfc42e1ea6726ec91a97e165d Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Wed, 15 Feb 2023 16:05:39 +0800
Subject: [PATCH 4/6] add cgroup resources json schema for isula update
Signed-off-by: zhongtao <zhongtao17@huawei.com>
---
.../schema/shim/client/cgroup-resources.json | 58 +++++++++++++++++++
.../schema/shim/client/process-state.json | 1 +
.../schema/shim/client/runtime-stats.json | 1 +
3 files changed, 60 insertions(+)
create mode 100644 src/json/schema/shim/client/cgroup-resources.json
diff --git a/src/json/schema/shim/client/cgroup-resources.json b/src/json/schema/shim/client/cgroup-resources.json
new file mode 100644
index 0000000..1031071
--- /dev/null
+++ b/src/json/schema/shim/client/cgroup-resources.json
@@ -0,0 +1,58 @@
+{
+ "_comment": "third party depend: runc",
+ "description": "cgroup resources",
+ "type": "object",
+ "properties": {
+ "blockIO": {
+ "type": "object",
+ "properties": {
+ "weight": {
+ "$ref": "../../defs.json#/definitions/uint64"
+ }
+ }
+ },
+ "cpu": {
+ "type": "object",
+ "properties": {
+ "shares": {
+ "$ref": "../../defs.json#/definitions/uint64"
+ },
+ "period": {
+ "$ref": "../../defs.json#/definitions/uint64"
+ },
+ "quota": {
+ "$ref": "../../defs.json#/definitions/int64"
+ },
+ "realtimeRuntime": {
+ "$ref": "../../defs.json#/definitions/int64"
+ },
+ "realtimePeriod": {
+ "$ref": "../../defs.json#/definitions/int64"
+ },
+ "cpus": {
+ "type": "string"
+ },
+ "mems": {
+ "type": "string"
+ }
+ }
+ },
+ "memory": {
+ "type": "object",
+ "properties": {
+ "limit": {
+ "$ref": "../../defs.json#/definitions/uint64"
+ },
+ "swap": {
+ "$ref": "../../defs.json#/definitions/uint64"
+ },
+ "reservation": {
+ "$ref": "../../defs.json#/definitions/uint64"
+ },
+ "kernel": {
+ "$ref": "../../defs.json#/definitions/uint64"
+ }
+ }
+ }
+ }
+}
diff --git a/src/json/schema/shim/client/process-state.json b/src/json/schema/shim/client/process-state.json
index 05f55fc..f07d14f 100644
--- a/src/json/schema/shim/client/process-state.json
+++ b/src/json/schema/shim/client/process-state.json
@@ -1,4 +1,5 @@
{
+ "_comment": "third party depend: runc",
"description": "process state info",
"type": "object",
"required": [
diff --git a/src/json/schema/shim/client/runtime-stats.json b/src/json/schema/shim/client/runtime-stats.json
index 6ed9473..ae77e9d 100644
--- a/src/json/schema/shim/client/runtime-stats.json
+++ b/src/json/schema/shim/client/runtime-stats.json
@@ -1,4 +1,5 @@
{
+ "_comment": "third party depend: runc",
"description": "runtime stats",
"type": "object",
"properties": {
--
2.25.1