feat(delivery): support multi-instance scheduling on a single host
- Per-host instance limit (DELIVERY_HOST_INSTANCE_LIMIT, default 4) - Optional target_host to pin a host from the candidate pool - Regenerate swagger docs
This commit is contained in:
+61
-118
@@ -145,7 +145,7 @@
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "返回所有已启用的部署目标(如 k8s 集群、主机池)",
|
||||
"description": "从 AWX 动态返回可用 Job Template 及其 Inventory hosts",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -153,6 +153,14 @@
|
||||
"delivery"
|
||||
],
|
||||
"summary": "获取可用部署目标",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "组件过滤,例如 mysql",
|
||||
"name": "component",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "items: 部署目标数组",
|
||||
@@ -169,64 +177,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "管理员创建新的部署目标(目前仅支持 k8s 类型)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"delivery"
|
||||
],
|
||||
"summary": "创建部署目标",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "目标配置",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.targetPayload"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "目标已创建",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/model.DeploymentTarget"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "参数错误",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "未授权",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"409": {
|
||||
"description": "名称冲突",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/auth/api/v1/delivery/tasks": {
|
||||
@@ -247,6 +197,7 @@
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "业务线 ID 过滤",
|
||||
"name": "business_line_id",
|
||||
"in": "query"
|
||||
@@ -682,65 +633,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"handler.targetPayload": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"awx_inventory_id",
|
||||
"awx_template_id",
|
||||
"name",
|
||||
"target_type"
|
||||
],
|
||||
"properties": {
|
||||
"awx_inventory_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"awx_template_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"target_type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.DeploymentTarget": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"awx_inventory_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"awx_template_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"target_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.ResourceQuota": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -809,18 +701,55 @@
|
||||
"target_id"
|
||||
],
|
||||
"properties": {
|
||||
"binlog_expire_logs_seconds": {
|
||||
"type": "integer"
|
||||
},
|
||||
"business_line_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"character_set": {
|
||||
"type": "string"
|
||||
},
|
||||
"collation": {
|
||||
"type": "string"
|
||||
},
|
||||
"cpu_milli": {
|
||||
"type": "integer"
|
||||
},
|
||||
"data_disk": {
|
||||
"type": "string"
|
||||
},
|
||||
"innodb_flush_log_at_trx_commit": {
|
||||
"type": "integer"
|
||||
},
|
||||
"innodb_io_capacity": {
|
||||
"type": "integer"
|
||||
},
|
||||
"innodb_redo_log_capacity": {
|
||||
"type": "string"
|
||||
},
|
||||
"instance_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"long_query_time": {
|
||||
"type": "number"
|
||||
},
|
||||
"lower_case_table_names": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_binlog_size": {
|
||||
"type": "string"
|
||||
},
|
||||
"max_connections": {
|
||||
"description": "高级参数(选填,零值视为未设置)",
|
||||
"type": "string"
|
||||
},
|
||||
"memory_mi": {
|
||||
"type": "integer"
|
||||
},
|
||||
"mysql_port": {
|
||||
"type": "integer"
|
||||
},
|
||||
"mysql_version": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -830,8 +759,22 @@
|
||||
"storage_gi": {
|
||||
"type": "integer"
|
||||
},
|
||||
"sync_binlog": {
|
||||
"type": "integer"
|
||||
},
|
||||
"target_host": {
|
||||
"description": "调度控制(选填):点名候选池内主机跳过自动选机,端口/配额/实机守卫照常执行",
|
||||
"type": "string"
|
||||
},
|
||||
"target_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"timezone": {
|
||||
"description": "数据库配置(选填,缺省由 playbook 基线兜底)",
|
||||
"type": "string"
|
||||
},
|
||||
"topology": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user