调用createDeployConfig新建通用应用镜像部署配置
接口URL:/v1/image/deploy/configs/createDeployConfig
Content-Type:application/json
请求方式:post
请求体参数说明:
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
appId | String | String | 是 | 应用ID,数据来源于分页获取应用列表 |
deployEnvId | String | String | 是 | 部署环境ID,数据来源于环境列表 |
envVariableList | Array | Array | 否 | 环境变量 |
lifeCycleMgt | Object | Object | 否 | 生命周期管理 |
name | String | String | 是 | 部署配置名称 |
podResourceSpec | Object | Object | 否 | 单Pod资源规格 |
startCommand | Object | Object | 否 | 启动命令 |
表envVariableList
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
name | String | String | 否 | 变量名称 |
type | String | String | 否 | 变量类型,只能填写CUSTOM |
value | String | String | 否 | 变量值 |
表ifeCycleMgt
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
liveness | Object | Object | 否 | 存活探针 |
readiness | Object | Object | 否 | 就绪探针 |
表liveness
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
enabled | Boolean | Boolean | 否 | 是否开启 |
exec | Object | Object | 否 | 执行命令 |
failureThreshold | Integer | Integer | 否 | 失败阈值 |
httpGet | Object | Object | 否 | 执行http GET请求 |
initialDelaySeconds | Integer | Integer | 否 | 初始延迟检测时间 |
mode | String | String | 否 | 模式,填写内容为:EXEC,HTTP_GET,TCP_SOCKET |
periodSeconds | Integer | Integer | 否 | 探测周期 |
successThreshold | Integer | Integer | 否 | 成功阈值 |
tcpSocket | Object | Object | 否 | 检测tcp端口 |
tcpSocket.host | String | String | 否 | 主机 |
tcpSocket.port | Integer | Integer | 否 | 端口 |
timeoutSeconds | Integer | Integer | 否 | 超时时间 |
表exec
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
command | Array | Array | 否 | 命令列表 |
表httpGet
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
headerList | Array | Array | 否 | 请求头 |
host | String | String | 否 | 主机 |
path | String | String | 否 | 路径 |
port | Integer | Integer | 否 | 端口 |
scheme | String | String | 否 | 模式(协议),填写内容为:HTTP/HTTPS |
表headerList
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
name | String | String | 否 | 名称 |
value | String | String | 否 | 值 |
表tcpSocket
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
host | String | String | 否 | 主机 |
port | Integer | Integer | 否 | 端口 |
表readiness
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
enabled | Boolean | Boolean | 否 | 是否开启 |
exec | Object | Object | 否 | 执行命令 |
failureThreshold | Integer | Integer | 否 | 失败阈值 |
httpGet | String | String | 否 | 执行http GET请求 |
initialDelaySeconds | Integer | Integer | 否 | 初始延迟检测时间 |
mode | String | String | 否 | 模式,填写内容为:EXEC,HTTP_GET,TCP_SOCKET |
periodSeconds | Integer | Integer | 否 | 探测周期 |
successThreshold | Integer | Integer | 否 | 成功阈值 |
tcpSocket | Object | Object | 否 | 检测tcp端口 |
表podResourceSpec
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
cpuLimit | Integer | Integer | 是 | cpu下限 |
cpuRequest | Integer | Integer | 是 | cpu上限 |
memoryLimit | Integer | Integer | 是 | 内存下限 |
memoryRequest | Integer | Integer | 是 | 内存上限 |
表startCommand
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
args | Array | Array | 否 | 参数 |
command | String | String | 否 | 命令 |
请求示例:
{"appId":"test_8b4017376070","deployEnvId":"test_8e5e03fe3281","name":"test_63a8aabd07df","podResourceSpec":{"cpuLimit":86,"cpuRequest":97,"memoryLimit":2,"memoryRequest":38},"startCommand":{"command":"test_662d4ee7c85a","args":["test_e3d0014579da"]},"envVariableList":[{"type":"test_57df648608a1","name":"test_2a16cca01430","value":"test_da8ad55125d4"}],"lifeCycleMgt":{"liveness":{"enabled":true,"initialDelaySeconds":24,"periodSeconds":25,"successThreshold":48,"timeoutSeconds":70,"failureThreshold":96,"mode":"test_dc2832cd90c1","exec":{"command":["test_f7860a59e89f"]},"httpGet":{"host":"test_6609aa089931","path":"test_0d1dd225097f","port":95,"scheme":"test_eec9fabb84f1","headerList":[{"name":"test_fecb4430a1e3","value":"test_7eeb41921c0d"}]},"tcpSocket":{"host":"test_dd81cf3bce5f","port":43}},"readiness":{"enabled":false,"initialDelaySeconds":32,"periodSeconds":89,"successThreshold":36,"timeoutSeconds":47,"failureThreshold":87,"mode":"test_cdf51413a978","exec":{"command":["test_2299c63d59f1"]},"httpGet":{"host":"test_1c1aa13c5dc2","path":"test_c99e070e1da9","port":40,"scheme":"test_c7947e320eb5","headerList":[{"name":"test_4552448401da","value":"test_c4811b3a6ea1"}]},"tcpSocket":{"host":"test_90e209ece824","port":73}}}}
返回参数说明:
参数名 | 示例值 | 参数类型 | 参数描述 |
---|---|---|---|
code | Integer | Integer | 暂无描述 |
data | String | String | 返回:部署配置ID |
msg | String | String | 暂无描述 |
返回示例:成功
{"code":"200","data":"58a7af16-05cd-4834-86fe-a72dcc1e1e45","msg":""}
返回示例:失败
{"code":"500","data":"","msg":"镜像不存在"}