智能边缘平台 IEF-更新应用部署:请求示例

时间:2023-11-01 16:21:57

请求示例

更新应用部署,应用部署副本数为1,应用实例启用主机网络,重启策略为“always”。

{  "deployment" : {    "replicas" : 1,    "template" : {      "configs" : {        "host_network" : true,        "host_pid" : true,        "migration" : true,        "restart_policy" : "Always",        "toleration_seconds" : 300      },      "containers" : [ {        "name" : "container-0",        "image_url" : "swr.cn-north-1.myhuaweicloud.com/ief-test/nginx:0705",        "args" : [ "-c", "sleep 1000" ],        "command" : [ "/bin/bash" ],        "resources" : {          "limits" : {            "cpu" : "0.25",            "memory" : "500",            "gpu" : "500"          },          "requests" : {            "cpu" : "0.25",            "memory" : "500",            "gpu" : "500"          }        },        "envs" : [ {          "name" : "CERT_PATH",          "value" : "/opt/cert"        } ],        "ports" : [ {          "container_port" : 80,          "host_port" : 80        } ],        "privileged" : true,        "readiness_probe" : {          "http_get" : {            "path" : "/",            "port" : 80,            "scheme" : "HTTP"          },          "initial_delay_seconds" : 10,          "timeout_seconds" : 10        },        "liveness_probe" : {          "http_get" : {            "path" : "/",            "port" : 80,            "scheme" : "HTTP"          },          "initial_delay_seconds" : 10,          "timeout_seconds" : 10        },        "version" : "1.0"      } ]    }  },  "description" : "this is a test app"}
support.huaweicloud.com/api-ief/ief_02_0084.html