lcr/0004-add-cgroup-resources-json-schema-for-isula-update.patch
openeuler-sync-bot dd2d06b3b3 !276 [sync] PR-273: sync from upstream
* sync from upstream
2023-12-11 14:34:37 +00: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 04/20] 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.33.0