Explorar o código

Allow strings for cpus fields

Signed-off-by: aiordache <[email protected]>
aiordache %!s(int64=5) %!d(string=hai) anos
pai
achega
60514c1adb
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      compose/config/config_schema_compose_spec.json

+ 3 - 3
compose/config/config_schema_compose_spec.json

@@ -153,7 +153,7 @@
         "cpu_period": {"type": ["number", "string"]},
         "cpu_rt_period": {"type": ["number", "string"]},
         "cpu_rt_runtime": {"type": ["number", "string"]},
-        "cpus": {"type": "number", "minimum": 0},
+        "cpus": {"type": ["number", "string"]},
         "cpuset": {"type": "string"},
         "credential_spec": {
           "type": "object",
@@ -503,7 +503,7 @@
             "limits": {
               "type": "object",
               "properties": {
-                "cpus": {"type": "number", "minimum": 0},
+                "cpus": {"type": ["number", "string"]},
                 "memory": {"type": "string"}
               },
               "additionalProperties": false,
@@ -512,7 +512,7 @@
             "reservations": {
               "type": "object",
               "properties": {
-                "cpus": {"type": "number", "minimum": 0},
+                "cpus": {"type": ["number", "string"]},
                 "memory": {"type": "string"},
                 "generic_resources": {"$ref": "#/definitions/generic_resources"}
               },