{ "swagger": "2.0", "info": { "description": "devops运维管理系统API接口文档", "title": "devops运维管理系统", "contact": {}, "version": "1.0" }, "paths": { "/api/v1/admin/add": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "新增用户接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "新增用户接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.AddSysAdminDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/admin/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据id删除接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "根据id删除用户接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SysAdminIdDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/admin/info": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据id查询用户接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "根据id查询用户接口", "parameters": [ { "type": "integer", "description": "Id", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/admin/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "分页获取用户列表接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "分页获取用户列表接口", "parameters": [ { "type": "integer", "description": "分页数", "name": "pageNum", "in": "query" }, { "type": "integer", "description": "每页数", "name": "pageSize", "in": "query" }, { "type": "string", "description": "用户名", "name": "username", "in": "query" }, { "type": "string", "description": "帐号启用状态:1-\u003e启用,2-\u003e禁用", "name": "status", "in": "query" }, { "type": "string", "description": "开始时间", "name": "beginTime", "in": "query" }, { "type": "string", "description": "结束时间", "name": "endTime", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/admin/update": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "修改用户接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "修改用户接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateSysAdminDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/admin/updatePassword": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "重置密码接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "重置密码接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.ResetSysAdminPasswordDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/admin/updatePersonal": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "修改个人信息接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "修改个人信息接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdatePersonalDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/admin/updatePersonalPassword": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "修改用户密码接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "修改用户密码接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdatePersonalPasswordDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/admin/updateStatus": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "用户状态启用/停用接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "用户状态启用/停用接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateSysAdminStatusDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/captcha": { "get": { "description": "验证码接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "验证码接口", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/database": { "put": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB数据库" ], "summary": "修改数据库记录", "parameters": [ { "description": "数据库信息(必须包含ID)", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CmdbSQL" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB数据库" ], "summary": "创建数据库", "parameters": [ { "description": "数据库信息", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CmdbSQL" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB数据库" ], "summary": "删除数据库记录", "parameters": [ { "type": "integer", "description": "数据库ID(query参数)", "name": "id", "in": "query" }, { "description": "请求体(包含id字段)", "name": "body", "in": "body", "schema": { "type": "object" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/database/byname": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB数据库" ], "summary": "根据名称查询数据库", "parameters": [ { "type": "string", "description": "数据库名称", "name": "name", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/database/bytype": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB数据库" ], "summary": "根据类型查询数据库", "parameters": [ { "type": "integer", "description": "数据库类型(1=MySQL 2=PostgreSQL 3=Redis 4=MongoDB 5=Elasticsearch)", "name": "type", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/database/info": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据ID获取数据库详情", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB数据库" ], "summary": "根据ID获取数据库详情", "parameters": [ { "type": "integer", "description": "数据库ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/databaselist": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB数据库" ], "summary": "获取数据库列表[分页]", "parameters": [ { "type": "integer", "default": 1, "description": "页码", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "每页数量", "name": "pageSize", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/groupadd": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "新增资产分组接口", "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "新增资产分组接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CmdbGroup" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/groupbyname": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据名称查询资产分组", "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "根据名称查询资产分组", "parameters": [ { "type": "string", "description": "分组名称", "name": "name", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/groupdelete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除资产分组接口", "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "删除资产分组接口", "parameters": [ { "description": "分组ID", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CmdbGroupIdDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/grouplist": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "查询所有资产分组,并以树形结构返回", "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "查询所有资产分组(树形结构)", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/grouplistwithhosts": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "查询所有资产分组及关联主机,并以树形结构返回", "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "查询所有资产分组及关联主机(树形结构)", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/groupupdate": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "更新资产分组接口", "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "更新资产分组接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CmdbGroup" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostbyip": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据IP查询主机(匹配内网IP、公网IP或SSH IP)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "根据IP查询主机", "parameters": [ { "type": "string", "description": "IP地址", "name": "ip", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostbyname": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据主机名称模糊查询", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "根据主机名称模糊查询", "parameters": [ { "type": "string", "description": "主机名称(模糊匹配)", "name": "name", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostbystatus": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据状态查询主机(1-\u003e认证成功,2-\u003e未认证,3-\u003e认证失败)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "根据状态查询主机", "parameters": [ { "type": "integer", "description": "状态(1/2/3)", "name": "status", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostcloudcreatealiyun": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建阿里云主机(通过阿里云API获取主机信息)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "创建阿里云主机", "parameters": [ { "description": "阿里云主机信息", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateCmdbHostCloudDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostcloudcreatebaidu": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建百度云主机(通过百度云API自动扫描所有区域并获取主机信息)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "创建百度云主机", "parameters": [ { "description": "百度云主机信息(AccessKey和SecretKey)", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateCmdbHostCloudDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostcloudcreatetencent": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建腾讯云主机(通过腾讯云API获取主机信息)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "创建腾讯云主机", "parameters": [ { "description": "腾讯云主机信息", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateCmdbHostCloudDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostcreate": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建主机", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "创建主机", "parameters": [ { "description": "主机信息", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateCmdbHostDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostdelete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除主机", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "删除主机", "parameters": [ { "description": "主机ID", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CmdbHostIdDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostgroup": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据分组ID获取主机列表(包括所有子分组的主机)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "根据分组ID获取主机列表", "parameters": [ { "type": "integer", "description": "分组ID", "name": "groupId", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostimport": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "通过上传Excel模板批量导入主机(Excel列顺序:主机别名、SSH地址、SSH端口、SSH用户、备注)", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "从Excel导入主机", "parameters": [ { "type": "file", "description": "Excel文件", "name": "file", "in": "formData", "required": true }, { "type": "integer", "description": "分组ID", "name": "groupId", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostinfo": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据ID获取主机", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "根据ID获取主机", "parameters": [ { "type": "integer", "description": "主机ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostlist": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取主机列表(分页)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "获取主机列表(分页)", "parameters": [ { "type": "integer", "description": "页码", "name": "page", "in": "query", "required": true }, { "type": "integer", "description": "每页数量", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostssh/command/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "在SSH终端执行命令", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB主机SSH" ], "summary": "执行SSH命令", "parameters": [ { "type": "integer", "description": "主机ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命令", "name": "command", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostssh/upload/{id}": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "上传本地文件到远程SSH服务器", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "CMDB主机SSH" ], "summary": "上传文件到SSH服务器", "parameters": [ { "type": "integer", "description": "主机ID", "name": "id", "in": "path", "required": true }, { "type": "file", "description": "要上传的文件", "name": "file", "in": "formData", "required": true }, { "type": "string", "description": "远程服务器目标路径", "name": "destPath", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hostsync": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据主机ID自动同步获取目标主机的基本信息(主机名称、操作系统、CPU、内存、磁盘、内网IP、公网IP)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "同步主机基本信息", "parameters": [ { "description": "主机ID", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CmdbHostIdDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/hosttemplate": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "下载主机导入Excel模板", "produces": [ "application/octet-stream" ], "tags": [ "CMDB资产管理" ], "summary": "下载主机导入模板", "responses": { "200": { "description": "OK", "schema": { "type": "file" } } } } }, "/api/v1/cmdb/hostupdate": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "更新主机", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CMDB资产管理" ], "summary": "更新主机", "parameters": [ { "description": "主机信息(包含ID)", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateCmdbHostDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/sql": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "执行更新语句(通过数据库ID/名称)", "produces": [ "application/json" ], "tags": [ "CMDB数据库" ], "summary": "执行更新语句", "parameters": [ { "description": "SQL更新请求", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.SQLRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "执行插入语句(通过数据库ID/名称)", "produces": [ "application/json" ], "tags": [ "CMDB数据库" ], "summary": "执行插入语句", "parameters": [ { "description": "SQL插入请求", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.SQLRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] }, { "ApiKeyAuth": [] } ], "description": "执行删除语句(通过数据库ID/名称)\n执行原生SQL语句(通过数据库ID/名称)", "produces": [ "application/json", "application/json" ], "tags": [ "CMDB数据库", "CMDB数据库" ], "summary": "执行原生SQL语句", "parameters": [ { "description": "SQL删除请求", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.SQLRequest" } }, { "description": "SQL执行请求", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.SQLRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/sql/databaselist": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定数据库实例的数据库列表", "produces": [ "application/json" ], "tags": [ "CMDB数据库" ], "summary": "获取数据库列表", "parameters": [ { "description": "数据库查询请求", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.SQLRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/sql/execute": { "post": { "security": [ { "ApiKeyAuth": [] }, { "ApiKeyAuth": [] } ], "description": "执行删除语句(通过数据库ID/名称)\n执行原生SQL语句(通过数据库ID/名称)", "produces": [ "application/json", "application/json" ], "tags": [ "CMDB数据库", "CMDB数据库" ], "summary": "执行原生SQL语句", "parameters": [ { "description": "SQL删除请求", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.SQLRequest" } }, { "description": "SQL执行请求", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.SQLRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/sql/select": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "执行查询语句(通过数据库ID/名称)", "produces": [ "application/json" ], "tags": [ "CMDB数据库" ], "summary": "执行查询语句", "parameters": [ { "description": "SQL查询请求", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.SQLRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/sqlLog/clean": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "清空SQL操作日志接口", "produces": [ "application/json" ], "tags": [ "CMDB数据库" ], "summary": "清空SQL操作日志接口", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/sqlLog/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据id删除SQL操作日志", "produces": [ "application/json" ], "tags": [ "CMDB数据库" ], "summary": "根据id删除SQL操作日志", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CmdbSqlLogIdDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/cmdb/sqlLog/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "分页获取SQL操作日志列表接口", "produces": [ "application/json" ], "tags": [ "CMDB数据库" ], "summary": "分页获取SQL操作日志列表接口", "parameters": [ { "type": "integer", "description": "每页数", "name": "pageSize", "in": "query" }, { "type": "integer", "description": "分页数", "name": "pageNum", "in": "query" }, { "type": "string", "description": "执行用户", "name": "execUser", "in": "query" }, { "type": "string", "description": "开始时间", "name": "beginTime", "in": "query" }, { "type": "string", "description": "结束时间", "name": "endTime", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/config/accountauth": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "根据ID获取账号详情", "parameters": [ { "type": "integer", "description": "账号ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.AccountAuth" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "更新账号认证信息", "parameters": [ { "description": "账号认证信息", "name": "account", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.AccountAuth" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.AccountAuth" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "创建账号认证信息", "parameters": [ { "description": "账号认证信息", "name": "account", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.AccountAuth" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.AccountAuth" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "删除账号认证信息", "parameters": [ { "type": "integer", "description": "账号ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/config/accountauth/alias": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "根据别名查询账号", "parameters": [ { "type": "string", "description": "账号别名", "name": "alias", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.AccountAuth" } } } ] } } } } }, "/api/v1/config/accountauth/decrypt": { "post": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "解密密码", "parameters": [ { "type": "integer", "description": "账号ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/api/v1/config/accountauth/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "获取账号列表(分页)", "parameters": [ { "type": "integer", "description": "页码", "name": "page", "in": "query", "required": true }, { "type": "integer", "description": "每页数量", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/result.PageResult" }, { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/model.AccountAuth" } } } } ] } } } ] } } } } }, "/api/v1/config/accountauth/type": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "根据类型查询账号", "parameters": [ { "type": "string", "description": "账号类型", "name": "type", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.AccountAuth" } } } } ] } } } } }, "/api/v1/config/ecsauthadd": { "post": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "创建凭据", "parameters": [ { "description": "凭据信息", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateEcsPasswordAuthDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/config/ecsauthdelete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "删除凭据", "parameters": [ { "description": "凭据ID", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.EcsAuthIdDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/config/ecsauthdetail": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "根据ID获取凭据详情", "parameters": [ { "type": "integer", "description": "凭据ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.EcsAuthVo" } } } ] } } } } }, "/api/v1/config/ecsauthinfo": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "根据名称获取凭据", "parameters": [ { "type": "string", "description": "凭据名称", "name": "name", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.EcsAuthVo" } } } ] } } } } }, "/api/v1/config/ecsauthlist": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "获取所有凭据(分页)", "parameters": [ { "type": "integer", "description": "页码", "name": "page", "in": "query", "required": true }, { "type": "integer", "description": "每页数量", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/result.PageResult" }, { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/model.EcsAuthVo" } } } } ] } } } ] } } } } }, "/api/v1/config/ecsauthupdate": { "put": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "更新凭据", "parameters": [ { "description": "凭据信息", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateEcsAuthDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/config/keymanage": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "根据ID获取密钥详情", "parameters": [ { "type": "integer", "description": "密钥ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.KeyManage" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "更新密钥管理信息", "parameters": [ { "description": "密钥管理信息", "name": "keyManage", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateKeyManageDto" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.KeyManage" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "创建密钥管理信息", "parameters": [ { "description": "密钥管理信息", "name": "keyManage", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateKeyManageDto" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.KeyManage" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "删除密钥管理信息", "parameters": [ { "type": "integer", "description": "密钥ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/config/keymanage/decrypt": { "post": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "解密密钥信息", "parameters": [ { "type": "integer", "description": "密钥ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "type": "string" } } } } ] } } } } }, "/api/v1/config/keymanage/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "获取密钥列表(分页)", "parameters": [ { "type": "integer", "description": "页码", "name": "page", "in": "query", "required": true }, { "type": "integer", "description": "每页数量", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/result.PageResult" }, { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/model.KeyManage" } } } } ] } } } ] } } } } }, "/api/v1/config/keymanage/sync": { "post": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "根据密钥类型自动同步对应云厂商的主机", "parameters": [ { "description": "同步参数,keyType: 1=阿里云,2=腾讯云,3=百度云", "name": "request", "in": "body", "required": true, "schema": { "type": "object", "properties": { "keyId": { "type": "integer" }, "keyType": { "type": "integer" } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/config/keymanage/type": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "根据云厂商类型查询密钥", "parameters": [ { "type": "integer", "description": "云厂商类型", "name": "type", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.KeyManage" } } } } ] } } } } }, "/api/v1/config/sync-schedule": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "根据ID获取定时同步配置详情", "parameters": [ { "type": "integer", "description": "配置ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SyncSchedule" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "更新定时同步配置", "parameters": [ { "description": "定时同步配置信息", "name": "syncSchedule", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateSyncScheduleDto" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SyncSchedule" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "创建定时同步配置", "parameters": [ { "description": "定时同步配置信息", "name": "syncSchedule", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateSyncScheduleDto" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SyncSchedule" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "删除定时同步配置", "parameters": [ { "type": "integer", "description": "配置ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/config/sync-schedule/active": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "获取所有启用的定时同步配置", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.SyncSchedule" } } } } ] } } } } }, "/api/v1/config/sync-schedule/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "获取定时同步配置列表(分页)", "parameters": [ { "type": "integer", "description": "页码", "name": "page", "in": "query", "required": true }, { "type": "integer", "description": "每页数量", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/result.PageResult" }, { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/model.SyncSchedule" } } } } ] } } } ] } } } } }, "/api/v1/config/sync-schedule/log": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "获取同步日志", "parameters": [ { "type": "integer", "description": "配置ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "lastRunTime": { "type": "string" }, "syncLog": { "type": "string" } } } } } ] } } } } }, "/api/v1/config/sync-schedule/scheduler-stats": { "get": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "获取调度器状态信息", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": true } } } ] } } } } }, "/api/v1/config/sync-schedule/toggle-status": { "post": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "切换配置状态(启用/禁用)", "parameters": [ { "description": "配置ID和状态", "name": "request", "in": "body", "required": true, "schema": { "type": "object", "properties": { "id": { "type": "integer" }, "status": { "type": "integer" } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/config/sync-schedule/trigger": { "post": { "security": [ { "ApiKeyAuth": [] } ], "tags": [ "Config配置中心" ], "summary": "手动触发定时同步(测试用)", "parameters": [ { "type": "integer", "description": "配置ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/dept/add": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "新增部门接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "新增部门接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SysDept" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/dept/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据id删除部门接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "根据id删除部门接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SysDeptIdDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/dept/info": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据id查询部门接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "根据id查询部门接口", "parameters": [ { "type": "integer", "description": "ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/dept/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "查询部门列表接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "查询部门列表接口", "parameters": [ { "type": "string", "description": "部门名称", "name": "deptName", "in": "query" }, { "type": "string", "description": "部门状态", "name": "deptStatus", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/dept/update": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "修改部门接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "修改部门接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SysDept" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/dept/users": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取某部门下的所有用户", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "获取某部门下的所有用户接口", "parameters": [ { "type": "integer", "description": "部门ID", "name": "deptId", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/dept/vo/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "部门下拉列表接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "部门下拉列表接口", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "分页获取K8s集群列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s集群管理" ], "summary": "获取K8s集群列表", "parameters": [ { "type": "integer", "default": 1, "description": "页码", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "每页数量", "name": "size", "in": "query" } ], "responses": { "200": { "description": "获取成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.KubeClusterListResponse" } } } ] } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建K8s集群,可选择是否自动部署", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s集群管理" ], "summary": "创建K8s集群", "parameters": [ { "description": "集群创建参数", "name": "cluster", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateKubeClusterRequest" } } ], "responses": { "200": { "description": "创建成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.KubeCluster" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据集群ID获取集群详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s集群管理" ], "summary": "获取K8s集群详情", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "获取成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.KubeCluster" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "集群不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "更新集群的基本信息(名称、描述、kubeconfig等)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s集群管理" ], "summary": "更新K8s集群信息", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "description": "集群更新参数", "name": "cluster", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateKubeClusterRequest" } } ], "responses": { "200": { "description": "更新成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.KubeCluster" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "集群不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除指定的K8s集群(只能删除已停止的集群)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s集群管理" ], "summary": "删除K8s集群", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "删除成功", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "参数错误或集群状态不允许删除", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "集群不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/detail": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取集群的完整详细信息,包括节点、工作负载、组件、网络配置、监控信息等", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s集群管理" ], "summary": "获取K8s集群详细信息", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "获取成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ClusterDetailResponse" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "集群不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/events": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取整个集群的事件列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s事件管理" ], "summary": "获取集群事件列表", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "default": 100, "description": "限制返回数量", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "获取成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.EventListResponse" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "集群不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/namespaces": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定集群的所有命名空间信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s命名空间管理" ], "summary": "获取K8s命名空间列表", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "获取成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.NamespaceListResponse" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "集群不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "在指定集群中创建新的命名空间", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s命名空间管理" ], "summary": "创建K8s命名空间", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "description": "命名空间信息", "name": "namespace", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateNamespaceRequest" } } ], "responses": { "200": { "description": "创建成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sNamespace" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "集群不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/namespaces/{namespaceName}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定命名空间的详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s命名空间管理" ], "summary": "获取K8s命名空间详情", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true } ], "responses": { "200": { "description": "获取成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sNamespace" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "命名空间不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "更新指定命名空间的标签和注释", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s命名空间管理" ], "summary": "更新K8s命名空间", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "description": "更新信息", "name": "namespace", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateNamespaceRequest" } } ], "responses": { "200": { "description": "更新成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sNamespace" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "命名空间不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除指定的命名空间(会同时删除其中的所有资源)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s命名空间管理" ], "summary": "删除K8s命名空间", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true } ], "responses": { "200": { "description": "删除成功", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "命名空间不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/namespaces/{namespaceName}/events": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定命名空间的事件列表,支持按资源类型和名称过滤", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s事件管理" ], "summary": "获取K8s事件列表", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "enum": [ "Pod", "Deployment", "StatefulSet", "DaemonSet", "Service" ], "type": "string", "description": "资源类型", "name": "kind", "in": "query" }, { "type": "string", "description": "资源名称", "name": "name", "in": "query" }, { "type": "integer", "default": 100, "description": "限制返回数量", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "获取成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.EventListResponse" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "集群不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/namespaces/{namespaceName}/limitranges": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定命名空间的所有默认资源限制", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s命名空间管理" ], "summary": "获取默认资源限制列表", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true } ], "responses": { "200": { "description": "获取成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.LimitRangeListResponse" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "命名空间不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "为指定命名空间创建默认资源限制", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s命名空间管理" ], "summary": "创建默认资源限制", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "description": "默认资源限制信息", "name": "limitrange", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateLimitRangeRequest" } } ], "responses": { "200": { "description": "创建成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.LimitRangeDetail" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "命名空间不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/namespaces/{namespaceName}/limitranges/{limitRangeName}": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "更新指定的默认资源限制", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s命名空间管理" ], "summary": "更新默认资源限制", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "LimitRange名称", "name": "limitRangeName", "in": "path", "required": true }, { "description": "更新信息", "name": "limitrange", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateLimitRangeRequest" } } ], "responses": { "200": { "description": "更新成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.LimitRangeDetail" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "默认资源限制不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除指定的默认资源限制", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s命名空间管理" ], "summary": "删除默认资源限制", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "LimitRange名称", "name": "limitRangeName", "in": "path", "required": true } ], "responses": { "200": { "description": "删除成功", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "默认资源限制不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/namespaces/{namespaceName}/resourcequotas": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定命名空间的所有资源配额", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s命名空间管理" ], "summary": "获取资源配额列表", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true } ], "responses": { "200": { "description": "获取成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ResourceQuotaListResponse" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "命名空间不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "为指定命名空间创建资源配额", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s命名空间管理" ], "summary": "创建资源配额", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "description": "资源配额信息", "name": "quota", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateResourceQuotaRequest" } } ], "responses": { "200": { "description": "创建成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ResourceQuotaDetail" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "命名空间不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/namespaces/{namespaceName}/resourcequotas/{quotaName}": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "更新指定的资源配额", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s命名空间管理" ], "summary": "更新资源配额", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "ResourceQuota名称", "name": "quotaName", "in": "path", "required": true }, { "description": "更新信息", "name": "quota", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateResourceQuotaRequest" } } ], "responses": { "200": { "description": "更新成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ResourceQuotaDetail" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "资源配额不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除指定的资源配额", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s命名空间管理" ], "summary": "删除资源配额", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "ResourceQuota名称", "name": "quotaName", "in": "path", "required": true } ], "responses": { "200": { "description": "删除成功", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "资源配额不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/nodes": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定集群的所有节点详细信息,包括名称/IP地址、状态、配置、资源使用情况等", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s节点管理" ], "summary": "获取K8s节点信息", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "获取成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.K8sNode" } } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "集群不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/nodes/{nodeName}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定节点的详细信息,包括容器组、资源使用详情等", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s节点管理" ], "summary": "获取单个节点详细信息", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "节点名称", "name": "nodeName", "in": "path", "required": true } ], "responses": { "200": { "description": "获取成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sNodeDetail" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "节点不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/nodes/{nodeName}/cordon": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "设置节点的可调度状态", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s节点管理" ], "summary": "封锁/解封节点", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "节点名称", "name": "nodeName", "in": "path", "required": true }, { "description": "封锁信息", "name": "cordon", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CordonNodeRequest" } } ], "responses": { "200": { "description": "操作成功", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "节点不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/nodes/{nodeName}/drain": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "驱逐节点上的所有Pod", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s节点管理" ], "summary": "驱逐节点", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "节点名称", "name": "nodeName", "in": "path", "required": true }, { "description": "驱逐配置", "name": "drain", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.DrainNodeRequest" } } ], "responses": { "200": { "description": "驱逐成功", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "节点不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/nodes/{nodeName}/enhanced": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取节点的完整详细信息,包括基本信息、系统信息、K8s组件版本、资源使用情况、监控信息、Pod列表等", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s节点管理" ], "summary": "获取增强的节点详细信息", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "节点名称", "name": "nodeName", "in": "path", "required": true } ], "responses": { "200": { "description": "获取成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.NodeDetailResponse" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "节点不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/nodes/{nodeName}/labels": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "为指定节点添加标签", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s节点管理" ], "summary": "为节点添加标签", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "节点名称", "name": "nodeName", "in": "path", "required": true }, { "description": "标签信息", "name": "label", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.AddLabelRequest" } } ], "responses": { "200": { "description": "添加成功", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "节点不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "移除指定节点的标签", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s节点管理" ], "summary": "移除节点标签", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "节点名称", "name": "nodeName", "in": "path", "required": true }, { "description": "标签信息", "name": "label", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.RemoveLabelRequest" } } ], "responses": { "200": { "description": "移除成功", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "节点不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/nodes/{nodeName}/resources": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取节点的资源容量、分配情况和Pod资源使用详情", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s节点管理" ], "summary": "获取节点资源分配详情", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "节点名称", "name": "nodeName", "in": "path", "required": true } ], "responses": { "200": { "description": "获取成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.NodeResourceAllocation" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "节点不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/nodes/{nodeName}/taints": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "为指定节点添加污点,控制Pod调度", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s节点管理" ], "summary": "为节点添加污点", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "节点名称", "name": "nodeName", "in": "path", "required": true }, { "description": "污点信息", "name": "taint", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.AddTaintRequest" } } ], "responses": { "200": { "description": "添加成功", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "节点不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "移除指定节点的污点", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s节点管理" ], "summary": "移除节点污点", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "节点名称", "name": "nodeName", "in": "path", "required": true }, { "description": "污点信息", "name": "taint", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.RemoveTaintRequest" } } ], "responses": { "200": { "description": "移除成功", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "节点不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/status": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取集群运行状态和节点信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s集群管理" ], "summary": "获取K8s集群状态", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "获取成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": true } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "集群不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/k8s/cluster/{id}/sync": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "通过K8s API同步集群版本、节点数量、集群状态等信息并更新数据库", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s集群管理" ], "summary": "同步K8s集群信息", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "同步成功", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.KubeCluster" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "集群不存在", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/login": { "post": { "description": "用户登录接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "用户登录接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.LoginDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/menu/add": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "新增菜单接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "新增菜单接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SysMenu" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/menu/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据id删除菜单接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "根据id删除菜单接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SysMenuIdDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/menu/info": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据id查询菜单", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "根据id查询菜单", "parameters": [ { "type": "integer", "description": "id", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/menu/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "查询菜单列表", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "查询菜单列表", "parameters": [ { "type": "string", "description": "菜单名称", "name": "menuName", "in": "query" }, { "type": "string", "description": "菜单状态", "name": "menuStatus", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/menu/update": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "修改菜单接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "修改菜单接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SysMenu" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/menu/vo/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "查询新增选项列表接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "查询新增选项列表接口", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/monitor/agent/delete/{id}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除指定的agent数据,用于服务器离线无法正常卸载的情况", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "监控" ], "summary": "删除agent数据", "parameters": [ { "type": "integer", "description": "Agent ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/monitor/agent/deploy": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "自动编译agent二进制文件,拷贝到目标主机并启动服务,单个主机传[hostId],多个主机传[hostId1,hostId2,hostId3]", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "监控" ], "summary": "部署agent到指定主机(支持单个或多个)", "parameters": [ { "description": "部署参数", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.BatchDeployAgentDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/monitor/agent/heartbeat": { "post": { "description": "Agent主动上报心跳信息,通过IP自动识别主机", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "监控" ], "summary": "更新Agent心跳", "parameters": [ { "description": "心跳数据", "name": "heartbeat", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.AgentHeartbeatDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/monitor/agent/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取所有Agent的列表信息,支持分页和筛选", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "监控" ], "summary": "获取Agent列表", "parameters": [ { "type": "integer", "description": "主机ID", "name": "hostId", "in": "query" }, { "type": "integer", "description": "状态", "name": "status", "in": "query" }, { "type": "integer", "description": "页码", "name": "page", "in": "query" }, { "type": "integer", "description": "页大小", "name": "pageSize", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/monitor/agent/restart/{id}": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "重启指定主机上的agent服务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "监控" ], "summary": "重启agent", "parameters": [ { "type": "integer", "description": "主机ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/monitor/agent/statistics": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取Agent的统计信息,包括各状态数量、平台分布等", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "监控" ], "summary": "获取Agent统计信息", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/monitor/agent/status/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定主机上agent的运行状态、版本信息等", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "监控" ], "summary": "获取agent状态", "parameters": [ { "type": "integer", "description": "主机ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/monitor/agent/uninstall": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "停止agent服务并删除相关文件,单个主机传[hostId],多个主机传[hostId1,hostId2,hostId3]", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "监控" ], "summary": "卸载指定主机的agent(支持单个或多个)", "parameters": [ { "description": "卸载参数(只需hostIds字段)", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.BatchDeployAgentDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/monitor/host/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取主机的CPU、内存、磁盘使用率", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "监控" ], "summary": "获取主机监控数据", "parameters": [ { "type": "integer", "description": "主机ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/monitor/hosts": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "批量获取主机的CPU、内存、磁盘使用率", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "监控" ], "summary": "批量获取主机监控数据,主机ID列表,逗号分隔,如:1,2,3", "parameters": [ { "type": "string", "description": "主机ID列表,逗号分隔,如:1,2,3", "name": "ids", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/monitor/hosts/{id}/all-metrics": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取主机的CPU、内存、磁盘、网络等所有指标的历史数据", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "监控" ], "summary": "获取主机所有指标历史数据", "parameters": [ { "type": "integer", "description": "主机ID", "name": "id", "in": "path", "required": true }, { "type": "string", "example": "\"2025-08-02 15:00:00\"", "description": "开始时间(格式: 2025-08-02 15:00:00)", "name": "start", "in": "query" }, { "type": "string", "example": "\"2025-08-02 16:00:00\"", "description": "结束时间(格式: 2025-08-02 16:00:00)", "name": "end", "in": "query" }, { "type": "string", "example": "\"1h\"", "description": "时间范围(30m/1h/3h/6h/12h/24h)", "name": "duration", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/monitor/hosts/{id}/history": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取主机的CPU、内存、磁盘使用率历史数据", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "监控" ], "summary": "获取主机指标历史数据-CPU、内存、磁盘", "parameters": [ { "type": "integer", "description": "主机ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "指标类型(cpu/memory/disk)", "name": "metric", "in": "query" }, { "type": "string", "example": "\"2025-08-02 15:00:00\"", "description": "开始时间(格式: 2025-08-02 15:00:00)", "name": "start", "in": "query" }, { "type": "string", "example": "\"2025-08-02 16:00:00\"", "description": "结束时间(格式: 2025-08-02 16:00:00)", "name": "end", "in": "query" }, { "type": "string", "example": "\"1h\"", "description": "时间范围(30m/1h/3h/6h/12h/24h)", "name": "duration", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/monitor/hosts/{id}/ports": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取主机所有TCP端口的监听状态、服务名称和进程信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "监控" ], "summary": "获取主机端口信息", "parameters": [ { "type": "integer", "description": "主机ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/monitor/hosts/{id}/top-processes": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取主机CPU和内存使用率前5名的进程信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "监控" ], "summary": "获取主机TOP进程使用率", "parameters": [ { "type": "integer", "description": "主机ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/post/add": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "新增岗位接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "新增岗位接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SysPost" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/post/batch/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "批量删除岗位接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "批量删除岗位接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.DelSysPostDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/post/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据id删除岗位接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "根据id删除岗位接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SysPostIdDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/post/info": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据id查询岗位", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "根据id查询岗位", "parameters": [ { "type": "integer", "description": "ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/post/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "分页查询岗位列表", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "分页查询岗位列表", "parameters": [ { "type": "integer", "description": "分页数", "name": "pageNum", "in": "query" }, { "type": "integer", "description": "每页数", "name": "pageSize", "in": "query" }, { "type": "string", "description": "岗位名称", "name": "postName", "in": "query" }, { "type": "string", "description": "状态:1-\u003e启用,2-\u003e禁用", "name": "postStatus", "in": "query" }, { "type": "string", "description": "开始时间", "name": "beginTime", "in": "query" }, { "type": "string", "description": "结束时间", "name": "endTime", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/post/update": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "修改岗位接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "修改岗位接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SysPost" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/post/updateStatus": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "岗位状态修改接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "岗位状态修改接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateSysPostStatusDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/post/vo/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "岗位下拉列表", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "岗位下拉列表", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/role/add": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "新增角色接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "新增角色接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.AddSysRoleDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/role/assignPermissions": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "分配权限接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "分配权限接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.RoleMenu" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/role/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据id删除角色接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "根据id删除角色接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SysRoleIdDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/role/info": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据id查询角色接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "根据id查询角色接口", "parameters": [ { "type": "integer", "description": "Id", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/role/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "分页查询角色列表接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "分页查询角色列表接口", "parameters": [ { "type": "integer", "description": "分页数", "name": "pageNum", "in": "query" }, { "type": "integer", "description": "每页数", "name": "pageSize", "in": "query" }, { "type": "string", "description": "角色名称", "name": "roleName", "in": "query" }, { "type": "string", "description": "帐号启用状态:1-\u003e启用,2-\u003e禁用", "name": "status", "in": "query" }, { "type": "string", "description": "开始时间", "name": "beginTime", "in": "query" }, { "type": "string", "description": "结束时间", "name": "endTime", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/role/update": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "修改角色", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "修改角色", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateSysRoleDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/role/updateStatus": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "角色状态启用/停用接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "角色状态启用/停用接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateSysRoleStatusDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/role/vo/idList": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据角色id查询菜单数据接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "根据角色id查询菜单数据接口", "parameters": [ { "type": "integer", "description": "Id", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/role/vo/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "角色下拉列表", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "角色下拉列表", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/sysLoginInfo/batch/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "批量删除登录日志接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "批量删除登录日志接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.DelSysLoginInfoDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/sysLoginInfo/clean": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "清空登录日志接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "清空登录日志接口", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/sysLoginInfo/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据ID删除登录日志接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "根据ID删除登录日志接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SysLoginInfoIdDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/sysLoginInfo/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "分页获取登录日志列表接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "分页获取登录日志列表接口", "parameters": [ { "type": "integer", "description": "分页数", "name": "pageNum", "in": "query" }, { "type": "integer", "description": "每页数", "name": "pageSize", "in": "query" }, { "type": "string", "description": "用户名", "name": "username", "in": "query" }, { "type": "string", "description": "登录状态(1-成功 2-失败)", "name": "loginStatus", "in": "query" }, { "type": "string", "description": "开始时间", "name": "beginTime", "in": "query" }, { "type": "string", "description": "结束时间", "name": "endTime", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/sysOperationLog/batch/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "批量删除操作日志接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "批量删除操作日志接口", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.BatchDeleteSysOperationLogDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/sysOperationLog/clean": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "清空操作日志接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "清空操作日志接口", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/sysOperationLog/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据id删除操作日志", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "根据id删除操作日志", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SysOperationLogIdDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/sysOperationLog/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "分页获取操作日志列表接口", "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "分页获取操作日志列表接口", "parameters": [ { "type": "integer", "description": "每页数", "name": "pageSize", "in": "query" }, { "type": "integer", "description": "分页数", "name": "pageNum", "in": "query" }, { "type": "string", "description": "用户名", "name": "username", "in": "query" }, { "type": "string", "description": "开始时间", "name": "beginTime", "in": "query" }, { "type": "string", "description": "结束时间", "name": "endTime", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/task/add": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建新的任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "创建任务", "parameters": [ { "description": "任务信息", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.CreateTaskRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/task/ansible": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建Ansible任务(1=手动,2=Git导入)。K8s部署任务请使用专门的K8s创建接口", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "任务作业" ], "summary": "创建Ansible任务", "parameters": [ { "type": "string", "description": "任务名称", "name": "name", "in": "formData", "required": true }, { "type": "integer", "description": "任务类型(1=手动,2=Git导入)", "name": "type", "in": "formData", "required": true }, { "type": "string", "description": "主机分组JSON", "name": "hostGroups", "in": "formData", "required": true }, { "type": "string", "description": "Git仓库地址(type=2时必填)", "name": "gitRepo", "in": "formData" }, { "type": "string", "description": "全局变量JSON", "name": "variables", "in": "formData" }, { "type": "file", "description": "playbook文件(type=1时上传)", "name": "playbooks", "in": "formData" }, { "type": "file", "description": "roles目录(type=1时上传)", "name": "roles", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.TaskAnsible" } } } ] } } } } }, "/api/v1/task/ansible/query/name": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据任务名称进行模糊查询", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务作业" ], "summary": "根据名称模糊查询Ansible任务", "parameters": [ { "type": "string", "description": "任务名称(支持模糊查询)", "name": "name", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.TaskAnsible" } } } } ] } } } } }, "/api/v1/task/ansible/query/type": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据任务类型查询(1=手动,2=Git导入,3=K8s部署)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务作业" ], "summary": "根据类型查询Ansible任务", "parameters": [ { "type": "integer", "description": "任务类型(1=手动,2=Git导入,3=K8s部署)", "name": "type", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.TaskAnsible" } } } } ] } } } } }, "/api/v1/task/ansible/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取Ansible任务详情", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务作业" ], "summary": "获取Ansible任务详情", "parameters": [ { "type": "integer", "description": "任务ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.TaskAnsible" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除指定的Ansible任务(级联删除关联的子任务)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务作业" ], "summary": "删除Ansible任务", "parameters": [ { "type": "integer", "description": "任务ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/task/ansible/{id}/log/{work_id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "通过SSE协议实时获取Ansible任务执行日志", "consumes": [ "application/json" ], "produces": [ "text/event-stream" ], "tags": [ "任务作业" ], "summary": "获取Ansible任务日志(SSE)", "parameters": [ { "type": "integer", "description": "任务ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "子任务ID", "name": "work_id", "in": "path", "required": true } ], "responses": { "200": { "description": "SSE格式的实时日志", "schema": { "type": "string" } } } } }, "/api/v1/task/ansible/{id}/start": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "启动指定的Ansible任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务作业" ], "summary": "启动Ansible任务", "parameters": [ { "type": "integer", "description": "任务ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/task/ansiblelist": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取Ansible任务列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务作业" ], "summary": "获取Ansible任务列表", "parameters": [ { "type": "integer", "default": 1, "description": "页码", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "每页数量", "name": "size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.ListResponse" } } } ] } } } } }, "/api/v1/task/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "删除任务", "parameters": [ { "description": "任务ID请求", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.TaskIDRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/task/execution-info": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取任务的执行次数和下次执行时间", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "获取任务执行信息", "parameters": [ { "type": "integer", "description": "任务ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": true } } } ] } } } } }, "/api/v1/task/get": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据任务ID查询任务详情", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "根据ID查询任务", "parameters": [ { "type": "integer", "description": "任务ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/task/k8s": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建K8s集群部署任务", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "任务作业" ], "summary": "创建K8s部署任务", "parameters": [ { "type": "string", "description": "任务名称", "name": "name", "in": "formData", "required": true }, { "type": "string", "description": "任务描述", "name": "description", "in": "formData" }, { "type": "string", "description": "K8s集群名称", "name": "cluster_name", "in": "formData", "required": true }, { "type": "string", "description": "K8s集群版本", "name": "cluster_version", "in": "formData", "required": true }, { "type": "integer", "description": "部署模式(1=单节点,2=集群)", "name": "deployment_mode", "in": "formData", "required": true }, { "type": "string", "description": "Master节点主机ID数组JSON", "name": "master_host_ids", "in": "formData", "required": true }, { "type": "string", "description": "Worker节点主机ID数组JSON", "name": "worker_host_ids", "in": "formData" }, { "type": "string", "description": "ETCD节点主机ID数组JSON", "name": "etcd_host_ids", "in": "formData", "required": true }, { "type": "string", "description": "启用组件数组JSON", "name": "enabled_components", "in": "formData" }, { "type": "string", "description": "私有仓库地址", "name": "private_registry", "in": "formData" }, { "type": "string", "description": "仓库用户名", "name": "registry_username", "in": "formData" }, { "type": "string", "description": "仓库密码", "name": "registry_password", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.TaskAnsible" } } } ] } } } } }, "/api/v1/task/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取任务列表,支持分页和条件查询", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "获取任务列表", "parameters": [ { "type": "integer", "default": 1, "description": "页码", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "每页数量", "name": "pageSize", "in": "query" }, { "type": "string", "description": "任务名称", "name": "name", "in": "query" }, { "type": "integer", "description": "任务状态(1=等待中,2=运行中,3=成功,4=异常)", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/task/list-with-details": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取任务列表,支持分页和条件查询,包含模板和主机的详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "获取任务列表(包含关联信息)", "parameters": [ { "type": "integer", "default": 1, "description": "页码", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "每页数量", "name": "pageSize", "in": "query" }, { "type": "string", "description": "任务名称", "name": "name", "in": "query" }, { "type": "integer", "description": "任务状态(1=等待中,2=运行中,3=成功,4=异常)", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/task/next-execution": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据cron表达式计算下次执行时间", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "计算下次执行时间", "parameters": [ { "type": "string", "description": "cron表达式", "name": "cron", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/task/query/name": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据任务名称模糊查询任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "根据名称查询任务", "parameters": [ { "type": "string", "description": "任务名称", "name": "name", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/task/query/status": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据任务状态查询任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "根据状态查询任务", "parameters": [ { "type": "integer", "description": "任务状态(1=等待中,2=运行中,3=成功,4=异常)", "name": "status", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/task/query/type": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据任务类型查询任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "根据类型查询任务", "parameters": [ { "type": "integer", "description": "任务类型(1=普通任务,2=定时任务,3=ansible任务,4=工作作业)", "name": "type", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/task/templates": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据任务ID获取关联模板信息及状态", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "获取任务模板及状态", "parameters": [ { "type": "integer", "description": "任务ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/task/update": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "更新任务信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "更新任务", "parameters": [ { "description": "需要更新的任务字段(必须包含ID)", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.Task" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/taskjob/log": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据任务ID和模板ID获取日志", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务作业" ], "summary": "获取任务日志", "parameters": [ { "type": "integer", "description": "任务ID", "name": "taskId", "in": "query", "required": true }, { "type": "integer", "description": "模板ID", "name": "templateId", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/taskjob/start": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据任务ID启动任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务作业" ], "summary": "启动任务", "parameters": [ { "type": "integer", "description": "任务ID", "name": "taskId", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/taskjob/status": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据任务ID和模板ID获取任务状态", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务作业" ], "summary": "获取任务状态", "parameters": [ { "type": "integer", "description": "任务ID", "name": "taskId", "in": "query", "required": true }, { "type": "integer", "description": "模板ID", "name": "templateId", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/taskjob/stop": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据任务ID和模板ID停止任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务作业" ], "summary": "停止单个任务", "parameters": [ { "type": "integer", "description": "任务ID", "name": "taskId", "in": "query", "required": true }, { "type": "integer", "description": "模板ID", "name": "templateId", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/template/add": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建新的任务模板", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "创建任务模板", "parameters": [ { "description": "任务模板信息", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.TaskTemplate" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/template/content/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定ID的任务模板脚本内容", "consumes": [ "application/json" ], "produces": [ "text/plain" ], "tags": [ "任务中心" ], "summary": "获取脚本内容", "parameters": [ { "type": "integer", "description": "模板ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "脚本内容", "schema": { "type": "string" } } } } }, "/api/v1/template/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除指定ID的任务模板", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "删除模板", "parameters": [ { "type": "integer", "description": "模板ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/template/info/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定ID的任务模板", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "根据ID获取模板", "parameters": [ { "type": "integer", "description": "模板ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/template/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取所有任务模板列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "获取所有模板", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/template/query/name": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取名称包含指定字符串的任务模板列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "根据名称模糊查询模板", "parameters": [ { "type": "string", "description": "模板名称", "name": "name", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/template/query/type": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定类型的任务模板列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "根据类型查询模板", "parameters": [ { "type": "integer", "description": "模板类型(1=shell, 2=python, 3=ansible)", "name": "type", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/template/update": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "更新任务模板", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务中心" ], "summary": "更新模板", "parameters": [ { "type": "integer", "description": "模板ID", "name": "id", "in": "query", "required": true }, { "description": "需要更新的模板字段", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.TaskTemplate" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/tool": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "更新导航工具接口", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Tool导航工具" ], "summary": "更新导航工具", "parameters": [ { "description": "导航工具信息", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateToolDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建导航工具接口", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Tool导航工具" ], "summary": "创建导航工具", "parameters": [ { "description": "导航工具信息", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.AddToolDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/tool/all": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取所有导航工具(不分页)", "produces": [ "application/json" ], "tags": [ "Tool导航工具" ], "summary": "获取所有导航工具", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/tool/deploy": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建一个服务部署任务,异步执行部署", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Tool运维工具箱" ], "summary": "创建部署任务", "parameters": [ { "description": "部署参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateDeployDto" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/tool/deploy/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取服务部署历史记录列表(分页)", "produces": [ "application/json" ], "tags": [ "Tool运维工具箱" ], "summary": "获取部署历史列表", "parameters": [ { "type": "string", "description": "服务名称(模糊查询)", "name": "serviceName", "in": "query" }, { "type": "integer", "description": "主机ID", "name": "hostId", "in": "query" }, { "type": "integer", "description": "状态: 0=部署中, 1=运行中, 2=已停止, 3=部署失败", "name": "status", "in": "query" }, { "type": "integer", "description": "页码", "name": "pageNum", "in": "query" }, { "type": "integer", "description": "每页数量", "name": "pageSize", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/tool/deploy/{id}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "停止并删除已部署的服务", "produces": [ "application/json" ], "tags": [ "Tool运维工具箱" ], "summary": "卸载服务", "parameters": [ { "type": "integer", "description": "部署ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/tool/deploy/{id}/status": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据部署ID获取部署状态和日志", "produces": [ "application/json" ], "tags": [ "Tool运维工具箱" ], "summary": "获取部署状态", "parameters": [ { "type": "integer", "description": "部署ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/tool/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取导航工具列表(分页)", "produces": [ "application/json" ], "tags": [ "Tool导航工具" ], "summary": "获取导航工具列表", "parameters": [ { "type": "string", "description": "标题(模糊查询)", "name": "title", "in": "query" }, { "type": "integer", "description": "页码", "name": "pageNum", "in": "query" }, { "type": "integer", "description": "每页数量", "name": "pageSize", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/tool/services": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取所有可部署的服务列表及分类", "produces": [ "application/json" ], "tags": [ "Tool运维工具箱" ], "summary": "获取可部署服务列表", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/tool/services/{serviceId}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据服务ID获取服务的详细信息", "produces": [ "application/json" ], "tags": [ "Tool运维工具箱" ], "summary": "获取服务详情", "parameters": [ { "type": "string", "description": "服务ID", "name": "serviceId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/tool/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据ID获取导航工具详情", "produces": [ "application/json" ], "tags": [ "Tool导航工具" ], "summary": "根据ID获取导航工具", "parameters": [ { "type": "integer", "description": "工具ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除导航工具接口", "produces": [ "application/json" ], "tags": [ "Tool导航工具" ], "summary": "删除导航工具", "parameters": [ { "type": "integer", "description": "工具ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/upload": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "单图片上传接口", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "System系统管理" ], "summary": "单图片上传接口", "parameters": [ { "type": "file", "description": "file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/api/v1/ws/task/ansible/{id}/log/{work_id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "建立WebSocket连接实时推送任务执行日志", "tags": [ "任务作业" ], "summary": "通过WebSocket实时获取Ansible任务日志", "parameters": [ { "type": "integer", "description": "任务ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "子任务ID", "name": "work_id", "in": "path", "required": true }, { "type": "string", "description": "认证token", "name": "token", "in": "query" } ], "responses": {} } }, "/apps": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取应用列表,支持分页和筛选", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Application" ], "summary": "获取应用列表", "parameters": [ { "type": "integer", "default": 1, "description": "页码", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "每页数量", "name": "pageSize", "in": "query" }, { "type": "string", "description": "应用名称(模糊查询)", "name": "name", "in": "query" }, { "type": "string", "description": "应用编码(模糊查询)", "name": "code", "in": "query" }, { "type": "string", "description": "应用类型", "name": "app_type", "in": "query" }, { "type": "integer", "description": "状态", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ApplicationListResponse" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建新的应用,应用编码(code)为可选参数,不提供则根据应用名称自动生成", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Application" ], "summary": "创建应用", "parameters": [ { "description": "创建应用请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateApplicationRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.Application" } } } ] } } } } }, "/apps/business-group-options": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取业务组和业务部门的树形选择器数据,支持二级分组", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ServiceTree" ], "summary": "获取业务组选项", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": true } } } } ] } } } } }, "/apps/deployment/applications": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据业务组、部门和环境获取可发布的应用列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "QuickDeployment" ], "summary": "获取可发布的应用列表", "parameters": [ { "type": "integer", "description": "业务组ID", "name": "business_group_id", "in": "query", "required": true }, { "type": "integer", "description": "业务部门ID", "name": "business_dept_id", "in": "query", "required": true }, { "type": "string", "description": "环境名称", "name": "environment", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.ApplicationForDeployment" } } } } ] } } } } }, "/apps/deployment/execute": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "启动快速发布流程,支持串行或并行执行模式", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "QuickDeployment" ], "summary": "执行快速发布", "parameters": [ { "description": "执行快速发布请求,支持选择执行模式", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.ExecuteQuickDeploymentRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/apps/deployment/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取快速发布列表,支持分页和筛选", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "QuickDeployment" ], "summary": "获取快速发布列表", "parameters": [ { "type": "integer", "default": 1, "description": "页码", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "每页数量", "name": "pageSize", "in": "query" }, { "type": "integer", "description": "业务组ID", "name": "business_group_id", "in": "query" }, { "type": "integer", "description": "业务部门ID", "name": "business_dept_id", "in": "query" }, { "type": "string", "description": "环境名称", "name": "environment", "in": "query" }, { "type": "integer", "description": "状态", "name": "status", "in": "query" }, { "type": "integer", "description": "创建人ID", "name": "creator_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.QuickDeploymentListResponse" } } } ] } } } } }, "/apps/deployment/quick": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建快速发布流程,包含多个应用的发布任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "QuickDeployment" ], "summary": "创建快速发布", "parameters": [ { "description": "创建快速发布请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateQuickDeploymentRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.QuickDeployment" } } } ] } } } } }, "/apps/deployment/tasks/{task_id}/log": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取快速发布任务的Jenkins构建日志", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "QuickDeployment" ], "summary": "获取任务构建日志", "parameters": [ { "type": "integer", "description": "任务ID", "name": "task_id", "in": "path", "required": true }, { "type": "integer", "default": 0, "description": "日志起始位置", "name": "start", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": true } } } ] } } } } }, "/apps/deployment/tasks/{task_id}/status": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取快速发布任务的实时状态信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "QuickDeployment" ], "summary": "获取任务状态", "parameters": [ { "type": "integer", "description": "任务ID", "name": "task_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.TaskStatusResponse" } } } ] } } } } }, "/apps/deployment/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取快速发布详情,包含所有任务信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "QuickDeployment" ], "summary": "获取快速发布详情", "parameters": [ { "type": "integer", "description": "发布ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.QuickDeployment" } } } ] } } } } }, "/apps/environment": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定应用在指定环境的详细配置信息,包括Jenkins配置状态", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Application" ], "summary": "获取应用环境配置", "parameters": [ { "type": "integer", "description": "应用ID", "name": "app_id", "in": "query", "required": true }, { "type": "string", "description": "环境名称", "name": "environment", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.AppEnvironmentResponse" } } } ] } } } } }, "/apps/jenkins-job/validate": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "验证指定Jenkins服务器中是否存在指定的任务名称", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Application" ], "summary": "验证Jenkins任务是否存在", "parameters": [ { "description": "验证Jenkins任务请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.ValidateJenkinsJobRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ValidateJenkinsJobResponse" } } } ] } } } } }, "/apps/jenkins-servers": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取所有类型为Jenkins(type=4)的服务器配置信息,用于Jenkins环境配置选择", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Application" ], "summary": "获取Jenkins服务器列表", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.JenkinsServerOption" } } } } ] } } } } }, "/apps/service-tree": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据业务线查询服务,按业务线重新组装排序服务,类似于服务树结构", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ServiceTree" ], "summary": "获取业务线服务树", "parameters": [ { "type": "array", "items": { "type": "integer" }, "collectionFormat": "csv", "description": "业务组ID列表,为空则查询所有", "name": "business_group_ids", "in": "query" }, { "type": "integer", "description": "应用状态筛选,为空则查询所有状态", "name": "status", "in": "query" }, { "type": "string", "description": "环境名称筛选,为空则不筛选环境配置", "name": "environment", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.BusinessLineServiceTree" } } } } ] } } } } }, "/apps/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据应用ID获取应用详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Application" ], "summary": "获取应用详情", "parameters": [ { "type": "integer", "description": "应用ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.Application" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "更新应用信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Application" ], "summary": "更新应用", "parameters": [ { "type": "integer", "description": "应用ID", "name": "id", "in": "path", "required": true }, { "description": "更新应用请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateApplicationRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.Application" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除指定的应用", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Application" ], "summary": "删除应用", "parameters": [ { "type": "integer", "description": "应用ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/apps/{id}/jenkins-envs": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据应用ID获取所有Jenkins环境配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "JenkinsEnv" ], "summary": "获取应用的所有Jenkins环境配置", "parameters": [ { "type": "integer", "description": "应用ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.JenkinsEnv" } } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "为指定应用添加新的Jenkins环境配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Application" ], "summary": "为应用添加Jenkins环境配置", "parameters": [ { "type": "integer", "description": "应用ID", "name": "id", "in": "path", "required": true }, { "description": "Jenkins环境配置请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateJenkinsEnvRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.JenkinsEnv" } } } ] } } } } }, "/apps/{id}/jenkins-envs/{env_id}": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "更新指定应用的Jenkins环境配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Application" ], "summary": "更新应用的Jenkins环境配置", "parameters": [ { "type": "integer", "description": "应用ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "Jenkins环境配置ID", "name": "env_id", "in": "path", "required": true }, { "description": "更新Jenkins环境配置请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateJenkinsEnvRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.JenkinsEnv" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除指定应用的Jenkins环境配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Application" ], "summary": "删除应用的Jenkins环境配置", "parameters": [ { "type": "integer", "description": "应用ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "Jenkins环境配置ID", "name": "env_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/dashboard/assets": { "get": { "description": "获取系统资产统计数据,包括主机(按云平台)、数据库(按类型)、K8s集群等资产分布", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "看板管理" ], "summary": "获取资产统计数据", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.AssetStats" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/dashboard/business-distribution": { "get": { "description": "获取各业务线的服务数量分布,包括总服务数量和各业务线的服务占比", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "看板管理" ], "summary": "获取业务分布统计数据", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.BusinessDistributionStats" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/dashboard/stats": { "get": { "description": "获取系统看板的各项统计数据,包括主机、K8s集群、发布、任务、服务和数据库统计", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "看板管理" ], "summary": "获取看板统计数据", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.DashboardStats" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/jenkins/servers": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取所有配置的Jenkins服务器", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jenkins" ], "summary": "获取Jenkins服务器列表", "parameters": [ { "type": "integer", "default": 1, "description": "页码", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "每页数量", "name": "pageSize", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.JenkinsServerListResponse" } } } ] } } } } }, "/jenkins/servers/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据服务器ID获取Jenkins服务器详情", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jenkins" ], "summary": "获取Jenkins服务器详情", "parameters": [ { "type": "integer", "description": "服务器ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.JenkinsServerInfo" } } } ] } } } } }, "/jenkins/test-connection": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "测试Jenkins服务器连接是否正常", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jenkins" ], "summary": "测试Jenkins连接", "parameters": [ { "description": "连接测试请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.TestJenkinsConnectionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.TestJenkinsConnectionResponse" } } } ] } } } } }, "/jenkins/{serverId}/jobs": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定Jenkins服务器的所有任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jenkins" ], "summary": "获取Jenkins任务列表", "parameters": [ { "type": "integer", "description": "服务器ID", "name": "serverId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.JenkinsJobListResponse" } } } ] } } } } }, "/jenkins/{serverId}/jobs/search": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "根据关键词模糊搜索指定Jenkins服务器的任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jenkins" ], "summary": "搜索Jenkins任务", "parameters": [ { "type": "integer", "description": "服务器ID", "name": "serverId", "in": "path", "required": true }, { "type": "string", "description": "搜索关键词", "name": "keyword", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.JenkinsJobListResponse" } } } ] } } } } }, "/jenkins/{serverId}/jobs/{jobName}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定任务的详细信息和构建历史", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jenkins" ], "summary": "获取Jenkins任务详情", "parameters": [ { "type": "integer", "description": "服务器ID", "name": "serverId", "in": "path", "required": true }, { "type": "string", "description": "任务名称", "name": "jobName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.JenkinsJobDetailResponse" } } } ] } } } } }, "/jenkins/{serverId}/jobs/{jobName}/builds/{buildNumber}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定构建的详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jenkins" ], "summary": "获取Jenkins构建详情", "parameters": [ { "type": "integer", "description": "服务器ID", "name": "serverId", "in": "path", "required": true }, { "type": "string", "description": "任务名称", "name": "jobName", "in": "path", "required": true }, { "type": "integer", "description": "构建编号", "name": "buildNumber", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.JenkinsBuildDetailResponse" } } } ] } } } } }, "/jenkins/{serverId}/jobs/{jobName}/builds/{buildNumber}/log": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定构建的日志信息,支持分页获取", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jenkins" ], "summary": "获取Jenkins构建日志", "parameters": [ { "type": "integer", "description": "服务器ID", "name": "serverId", "in": "path", "required": true }, { "type": "string", "description": "任务名称", "name": "jobName", "in": "path", "required": true }, { "type": "integer", "description": "构建编号", "name": "buildNumber", "in": "path", "required": true }, { "type": "integer", "default": 0, "description": "开始位置", "name": "start", "in": "query" }, { "type": "boolean", "default": false, "description": "是否返回HTML格式", "name": "html", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.GetBuildLogResponse" } } } ] } } } } }, "/jenkins/{serverId}/jobs/{jobName}/builds/{buildNumber}/stop": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "停止指定的Jenkins构建任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jenkins" ], "summary": "停止Jenkins构建", "parameters": [ { "type": "integer", "description": "服务器ID", "name": "serverId", "in": "path", "required": true }, { "type": "string", "description": "任务名称", "name": "jobName", "in": "path", "required": true }, { "type": "integer", "description": "构建编号", "name": "buildNumber", "in": "path", "required": true }, { "description": "停止构建请求", "name": "request", "in": "body", "schema": { "$ref": "#/definitions/model.StopBuildRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.StopBuildResponse" } } } ] } } } } }, "/jenkins/{serverId}/jobs/{jobName}/start": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "启动指定的Jenkins任务,支持带参数构建", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jenkins" ], "summary": "启动Jenkins任务", "parameters": [ { "type": "integer", "description": "服务器ID", "name": "serverId", "in": "path", "required": true }, { "type": "string", "description": "任务名称", "name": "jobName", "in": "path", "required": true }, { "description": "启动任务请求", "name": "request", "in": "body", "schema": { "$ref": "#/definitions/model.StartJobRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.StartJobResponse" } } } ] } } } } }, "/jenkins/{serverId}/queue": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定Jenkins服务器的构建队列信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jenkins" ], "summary": "获取Jenkins队列信息", "parameters": [ { "type": "integer", "description": "服务器ID", "name": "serverId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.JenkinsQueue" } } } ] } } } } }, "/jenkins/{serverId}/system-info": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取指定Jenkins服务器的系统信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jenkins" ], "summary": "获取Jenkins系统信息", "parameters": [ { "type": "integer", "description": "服务器ID", "name": "serverId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.JenkinsSystemInfo" } } } ] } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/configmaps": { "get": { "description": "获取指定集群和命名空间下的ConfigMap列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s配置管理" ], "summary": "获取ConfigMap列表", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "页码", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "每页大小", "name": "pageSize", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ConfigMapListResponse" } } } ] } } } }, "post": { "description": "创建新的ConfigMap", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s配置管理" ], "summary": "创建ConfigMap", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "description": "创建ConfigMap请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateConfigMapRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sConfigMap" } } } ] } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/configmaps/{configMapName}": { "get": { "description": "获取指定ConfigMap的详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s配置管理" ], "summary": "获取ConfigMap详情", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "ConfigMap名称", "name": "configMapName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ConfigMapDetail" } } } ] } } } }, "put": { "description": "更新指定的ConfigMap", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s配置管理" ], "summary": "更新ConfigMap", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "ConfigMap名称", "name": "configMapName", "in": "path", "required": true }, { "description": "更新ConfigMap请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateConfigMapRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sConfigMap" } } } ] } } } }, "delete": { "description": "删除指定的ConfigMap", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s配置管理" ], "summary": "删除ConfigMap", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "ConfigMap名称", "name": "configMapName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/configmaps/{configMapName}/yaml": { "get": { "description": "获取指定ConfigMap的YAML配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s配置管理" ], "summary": "获取ConfigMap YAML", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "ConfigMap名称", "name": "configMapName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } }, "put": { "description": "通过YAML更新ConfigMap配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s配置管理" ], "summary": "更新ConfigMap YAML", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "ConfigMap名称", "name": "configMapName", "in": "path", "required": true }, { "description": "YAML内容", "name": "request", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": true } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sConfigMap" } } } ] } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/deployments": { "post": { "description": "在指定命名空间中创建新的Deployment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Deployment管理" ], "summary": "创建Deployment", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "description": "Deployment配置", "name": "deployment", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateDeploymentRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sWorkload" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/deployments/{deploymentName}": { "put": { "description": "更新指定的Deployment配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Deployment管理" ], "summary": "更新Deployment", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Deployment名称", "name": "deploymentName", "in": "path", "required": true }, { "description": "更新配置", "name": "deployment", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateWorkloadRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sWorkload" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "description": "删除指定的Deployment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Deployment管理" ], "summary": "删除Deployment", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Deployment名称", "name": "deploymentName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/deployments/{deploymentName}/history": { "get": { "description": "获取指定Deployment的所有版本历史信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Deployment版本管理" ], "summary": "获取Deployment版本历史", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Deployment名称", "name": "deploymentName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.DeploymentRolloutHistoryResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/deployments/{deploymentName}/pause": { "post": { "description": "暂停正在进行的Deployment滚动更新过程", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Deployment版本管理" ], "summary": "暂停Deployment滚动更新", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Deployment名称", "name": "deploymentName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.PauseDeploymentResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/deployments/{deploymentName}/restart": { "post": { "description": "通过更新Pod模板来重启Deployment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Deployment管理" ], "summary": "重启Deployment", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Deployment名称", "name": "deploymentName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/deployments/{deploymentName}/resume": { "post": { "description": "恢复被暂停的Deployment滚动更新过程", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Deployment版本管理" ], "summary": "恢复Deployment滚动更新", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Deployment名称", "name": "deploymentName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ResumeDeploymentResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/deployments/{deploymentName}/revisions/{revision}": { "get": { "description": "获取指定Deployment特定版本的详细配置信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Deployment版本管理" ], "summary": "获取Deployment指定版本详情", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Deployment名称", "name": "deploymentName", "in": "path", "required": true }, { "type": "integer", "description": "版本号", "name": "revision", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.DeploymentRevisionDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/deployments/{deploymentName}/rollback": { "post": { "description": "将Deployment回滚到指定的历史版本", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Deployment版本管理" ], "summary": "回滚Deployment到指定版本", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Deployment名称", "name": "deploymentName", "in": "path", "required": true }, { "description": "回滚请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.RollbackDeploymentRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.RollbackDeploymentResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/deployments/{deploymentName}/rollout-status": { "get": { "description": "获取指定Deployment的当前滚动发布状态和进度信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Deployment版本管理" ], "summary": "获取Deployment滚动发布状态", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Deployment名称", "name": "deploymentName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.DeploymentRolloutStatusResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/deployments/{deploymentName}/scale": { "post": { "description": "调整Deployment的副本数", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Deployment管理" ], "summary": "伸缩Deployment", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Deployment名称", "name": "deploymentName", "in": "path", "required": true }, { "description": "伸缩配置", "name": "scale", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.ScaleWorkloadRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/ingresses": { "get": { "description": "获取指定命名空间的Ingress列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Ingress管理" ], "summary": "获取Ingress列表", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.IngressListResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "post": { "description": "在指定命名空间中创建新的Ingress", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Ingress管理" ], "summary": "创建Ingress", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "description": "Ingress配置", "name": "ingress", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateIngressRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sIngress" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/ingresses/{ingressName}": { "get": { "description": "获取指定Ingress的详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Ingress管理" ], "summary": "获取Ingress详情", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Ingress名称", "name": "ingressName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.IngressDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "put": { "description": "更新指定的Ingress配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Ingress管理" ], "summary": "更新Ingress", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Ingress名称", "name": "ingressName", "in": "path", "required": true }, { "description": "更新配置", "name": "ingress", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateIngressRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sIngress" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "description": "删除指定的Ingress", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Ingress管理" ], "summary": "删除Ingress", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Ingress名称", "name": "ingressName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/ingresses/{ingressName}/events": { "get": { "description": "获取指定Ingress的相关事件列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Ingress管理" ], "summary": "获取Ingress事件", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Ingress名称", "name": "ingressName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.K8sEvent" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/ingresses/{ingressName}/monitoring": { "get": { "description": "获取指定Ingress的监控指标和状态信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Ingress管理" ], "summary": "获取Ingress监控信息", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Ingress名称", "name": "ingressName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/ingresses/{ingressName}/yaml": { "get": { "description": "获取指定Ingress的完整YAML配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Ingress管理" ], "summary": "获取Ingress的YAML配置", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Ingress名称", "name": "ingressName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "put": { "description": "通过提供的YAML内容更新Ingress配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Ingress管理" ], "summary": "通过YAML更新Ingress", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Ingress名称", "name": "ingressName", "in": "path", "required": true }, { "description": "YAML内容", "name": "yaml", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": true } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/metrics": { "get": { "description": "获取指定命名空间下所有Pod的CPU、内存等监控指标汇总", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s监控" ], "summary": "获取命名空间监控指标", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.NamespaceMetricsInfo" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/pods": { "get": { "description": "获取指定命名空间的Pod列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Pod管理" ], "summary": "获取Pod列表", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/pods/yaml": { "post": { "description": "通过提供的YAML内容创建Pod,支持校验模式和DryRun模式", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Pod管理" ], "summary": "通过YAML创建Pod", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "description": "创建请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreatePodFromYAMLRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.CreatePodFromYAMLResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/pods/{podName}": { "get": { "description": "获取指定Pod的详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Pod管理" ], "summary": "获取Pod详情", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Pod名称", "name": "podName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sPodDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "description": "删除指定的Pod", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Pod管理" ], "summary": "删除Pod", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Pod名称", "name": "podName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/pods/{podName}/containers": { "get": { "description": "获取指定Pod中所有容器的名称列表,用于终端连接时选择容器", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s容器终端" ], "summary": "获取Pod中的容器列表", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Pod名称", "name": "podName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "string" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/pods/{podName}/events": { "get": { "description": "获取指定Pod的相关事件列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Pod管理" ], "summary": "获取Pod事件", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Pod名称", "name": "podName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/pods/{podName}/logs": { "get": { "description": "获取指定Pod容器的日志", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Pod管理" ], "summary": "获取Pod日志", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Pod名称", "name": "podName", "in": "path", "required": true }, { "type": "string", "description": "容器名称", "name": "container", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/pods/{podName}/metrics": { "get": { "description": "获取指定Pod的CPU、内存等监控指标和使用率", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s监控" ], "summary": "获取Pod监控指标", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Pod名称", "name": "podName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.PodMetricsInfo" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/pods/{podName}/terminal": { "get": { "description": "通过WebSocket连接到指定Pod的终端", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s容器终端" ], "summary": "连接到Pod终端", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Pod名称", "name": "podName", "in": "path", "required": true }, { "type": "string", "description": "容器名称(默认为Pod中第一个容器)", "name": "containerName", "in": "query" }, { "type": "string", "description": "执行命令(默认为/bin/bash)", "name": "command", "in": "query" } ], "responses": { "101": { "description": "Switching Protocols" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/pods/{podName}/yaml": { "get": { "description": "获取指定Pod的完整YAML配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Pod管理" ], "summary": "获取Pod的YAML配置", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Pod名称", "name": "podName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "put": { "description": "通过YAML内容更新指定的Pod配置,支持校验模式和DryRun模式", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Pod管理" ], "summary": "更新Pod的YAML配置", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Pod名称", "name": "podName", "in": "path", "required": true }, { "description": "更新请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdatePodYAMLRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.UpdatePodYAMLResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/pvcs": { "get": { "description": "获取指定命名空间的PVC列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-PVC" ], "summary": "获取PVC列表", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.PVCListResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "post": { "description": "在指定命名空间中创建新的PVC", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-PVC" ], "summary": "创建PVC", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "description": "PVC配置", "name": "pvc", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreatePVCRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sPersistentVolumeClaim" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/pvcs/{pvcName}": { "get": { "description": "获取指定PVC的详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-PVC" ], "summary": "获取PVC详情", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "PVC名称", "name": "pvcName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.PVCDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "put": { "description": "更新指定的PVC配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-PVC" ], "summary": "更新PVC", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "PVC名称", "name": "pvcName", "in": "path", "required": true }, { "description": "更新配置", "name": "pvc", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdatePVCRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sPersistentVolumeClaim" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "description": "删除指定的PVC", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-PVC" ], "summary": "删除PVC", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "PVC名称", "name": "pvcName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/pvcs/{pvcName}/yaml": { "get": { "description": "获取指定PVC的完整YAML配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-PVC" ], "summary": "获取PVC的YAML配置", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "PVC名称", "name": "pvcName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "put": { "description": "通过提供的YAML内容更新PVC配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-PVC" ], "summary": "通过YAML更新PVC", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "PVC名称", "name": "pvcName", "in": "path", "required": true }, { "description": "YAML内容", "name": "yaml", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": true } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/secrets": { "get": { "description": "获取指定集群和命名空间下的Secret列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s配置管理" ], "summary": "获取Secret列表", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "页码", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "每页大小", "name": "pageSize", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SecretListResponse" } } } ] } } } }, "post": { "description": "创建新的Secret", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s配置管理" ], "summary": "创建Secret", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "description": "创建Secret请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateSecretRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sSecret" } } } ] } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/secrets/{secretName}": { "get": { "description": "获取指定Secret的详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s配置管理" ], "summary": "获取Secret详情", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Secret名称", "name": "secretName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SecretDetail" } } } ] } } } }, "put": { "description": "更新指定的Secret", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s配置管理" ], "summary": "更新Secret", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Secret名称", "name": "secretName", "in": "path", "required": true }, { "description": "更新Secret请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateSecretRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sSecret" } } } ] } } } }, "delete": { "description": "删除指定的Secret", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s配置管理" ], "summary": "删除Secret", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Secret名称", "name": "secretName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/secrets/{secretName}/yaml": { "get": { "description": "获取指定Secret的YAML配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s配置管理" ], "summary": "获取Secret YAML", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Secret名称", "name": "secretName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } }, "put": { "description": "通过YAML更新Secret配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s配置管理" ], "summary": "更新Secret YAML", "parameters": [ { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Secret名称", "name": "secretName", "in": "path", "required": true }, { "description": "YAML内容", "name": "request", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": true } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sSecret" } } } ] } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/services": { "get": { "description": "获取指定命名空间的Service列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Service管理" ], "summary": "获取Service列表", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ServiceListResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "post": { "description": "在指定命名空间中创建新的Service", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Service管理" ], "summary": "创建Service", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "description": "Service配置", "name": "service", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateServiceRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sService" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/services/{serviceName}": { "get": { "description": "获取指定Service的详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Service管理" ], "summary": "获取Service详情", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Service名称", "name": "serviceName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ServiceDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "put": { "description": "更新指定的Service配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Service管理" ], "summary": "更新Service", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Service名称", "name": "serviceName", "in": "path", "required": true }, { "description": "更新配置", "name": "service", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateServiceRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sService" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "description": "删除指定的Service", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Service管理" ], "summary": "删除Service", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Service名称", "name": "serviceName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/services/{serviceName}/events": { "get": { "description": "获取指定Service的相关事件列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Service管理" ], "summary": "获取Service事件", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Service名称", "name": "serviceName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.K8sEvent" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/services/{serviceName}/yaml": { "get": { "description": "获取指定Service的完整YAML配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Service管理" ], "summary": "获取Service的YAML配置", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Service名称", "name": "serviceName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "put": { "description": "通过提供的YAML内容更新Service配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s Service管理" ], "summary": "通过YAML更新Service", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "type": "string", "description": "Service名称", "name": "serviceName", "in": "path", "required": true }, { "description": "YAML内容", "name": "yaml", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": true } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/workloads": { "get": { "description": "获取指定命名空间的工作负载列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s工作负载管理" ], "summary": "获取工作负载列表", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "enum": [ "deployment", "statefulset", "daemonset", "job", "cronjob", "all" ], "type": "string", "description": "工作负载类型", "name": "type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.WorkloadListResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/workloads/yaml": { "put": { "description": "通过YAML内容更新指定的工作负载配置,支持deployment,statefulset,daemonset,job,cronjob", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "工作负载YAML管理" ], "summary": "更新工作负载的YAML配置", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "description": "更新请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateWorkloadYAMLRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.UpdateWorkloadYAMLResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/workloads/{type}/{workloadName}": { "get": { "description": "获取指定工作负载的详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s工作负载管理" ], "summary": "获取工作负载详情", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "enum": [ "deployment", "statefulset", "daemonset", "job", "cronjob" ], "type": "string", "description": "工作负载类型", "name": "type", "in": "path", "required": true }, { "type": "string", "description": "工作负载名称", "name": "workloadName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sWorkloadDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/workloads/{type}/{workloadName}/pods": { "get": { "description": "获取指定工作负载下的所有Pod信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Pod管理" ], "summary": "获取工作负载下的Pod列表", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "enum": [ "deployment", "statefulset", "daemonset", "job", "cronjob" ], "type": "string", "description": "工作负载类型", "name": "type", "in": "path", "required": true }, { "type": "string", "description": "工作负载名称", "name": "workloadName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.K8sPodInfo" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/namespaces/{namespaceName}/workloads/{workloadType}/{workloadName}/yaml": { "get": { "description": "获取指定工作负载的完整YAML配置,支持deployment,statefulset,daemonset,job,cronjob", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "工作负载YAML管理" ], "summary": "获取工作负载的YAML配置", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "命名空间名称", "name": "namespaceName", "in": "path", "required": true }, { "enum": [ "deployment", "statefulset", "daemonset", "job", "cronjob" ], "type": "string", "description": "工作负载类型", "name": "workloadType", "in": "path", "required": true }, { "type": "string", "description": "工作负载名称", "name": "workloadName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.GetWorkloadYAMLResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/nodes/{nodeName}/metrics": { "get": { "description": "获取指定节点的CPU、内存等监控指标和使用率", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s监控" ], "summary": "获取节点监控指标", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "节点名称", "name": "nodeName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.NodeMetricsInfo" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/pvs": { "get": { "description": "获取集群中的PV列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-PV" ], "summary": "获取PV列表", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.PVListResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "post": { "description": "在集群中创建新的PV", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-PV" ], "summary": "创建PV", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "description": "PV配置", "name": "pv", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreatePVRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sPersistentVolume" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/pvs/{pvName}": { "get": { "description": "获取指定PV的详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-PV" ], "summary": "获取PV详情", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "PV名称", "name": "pvName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.PVDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "put": { "description": "更新指定的PV配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-PV" ], "summary": "更新PV", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "PV名称", "name": "pvName", "in": "path", "required": true }, { "description": "更新配置", "name": "pv", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdatePVRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sPersistentVolume" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "description": "删除指定的PV", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-PV" ], "summary": "删除PV", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "PV名称", "name": "pvName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/pvs/{pvName}/yaml": { "get": { "description": "获取指定PV的完整YAML配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-PV" ], "summary": "获取PV的YAML配置", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "PV名称", "name": "pvName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "put": { "description": "通过提供的YAML内容更新PV配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-PV" ], "summary": "通过YAML更新PV", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "PV名称", "name": "pvName", "in": "path", "required": true }, { "description": "YAML内容", "name": "yaml", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": true } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/storageclasses": { "get": { "description": "获取集群中的存储类列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-StorageClass" ], "summary": "获取存储类列表", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.StorageClassListResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "post": { "description": "在集群中创建新的存储类", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-StorageClass" ], "summary": "创建存储类", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "description": "存储类配置", "name": "storageClass", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateStorageClassRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sStorageClass" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/storageclasses/{storageClassName}": { "get": { "description": "获取指定存储类的详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-StorageClass" ], "summary": "获取存储类详情", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "存储类名称", "name": "storageClassName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.StorageClassDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "put": { "description": "更新指定的存储类配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-StorageClass" ], "summary": "更新存储类", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "存储类名称", "name": "storageClassName", "in": "path", "required": true }, { "description": "更新配置", "name": "storageClass", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateStorageClassRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.K8sStorageClass" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "delete": { "description": "删除指定的存储类", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-StorageClass" ], "summary": "删除存储类", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "存储类名称", "name": "storageClassName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/storageclasses/{storageClassName}/yaml": { "get": { "description": "获取指定存储类的完整YAML配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-StorageClass" ], "summary": "获取存储类的YAML配置", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "存储类名称", "name": "storageClassName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } }, "put": { "description": "通过提供的YAML内容更新存储类配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8s存储管理-StorageClass" ], "summary": "通过YAML更新存储类", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "存储类名称", "name": "storageClassName", "in": "path", "required": true }, { "description": "YAML内容", "name": "yaml", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": true } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/k8s/cluster/{id}/yaml/validate": { "post": { "description": "校验提供的YAML内容是否符合Kubernetes资源规范", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "YAML校验" ], "summary": "校验YAML格式", "parameters": [ { "type": "string", "description": "Bearer 用户Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "集群ID", "name": "id", "in": "path", "required": true }, { "description": "校验请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.ValidateYAMLRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/result.Result" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ValidateYAMLResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/task/monitor/queue/clear-failed": { "post": { "description": "清空失败任务队列中的所有任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务监控" ], "summary": "清空失败队列", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/task/monitor/queue/details": { "get": { "description": "获取各个优先级队列的详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务监控" ], "summary": "获取队列详细信息", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/task/monitor/queue/metrics": { "get": { "description": "获取任务队列的运行指标,包括队列长度、处理统计等", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务监控" ], "summary": "获取任务队列指标", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/task/monitor/queue/retry-failed": { "post": { "description": "将失败队列中的任务重新提交到正常队列", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务监控" ], "summary": "重试失败队列中的任务", "parameters": [ { "type": "integer", "description": "重试任务数量限制,默认10,最大100", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/task/monitor/scheduled/pause": { "post": { "description": "暂停正在运行的定时任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务监控" ], "summary": "暂停定时任务", "parameters": [ { "type": "integer", "description": "任务ID", "name": "task_id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/task/monitor/scheduled/reset": { "post": { "description": "将定时任务的所有子任务状态重置为等待中(1),用于修复状态异常的情况", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务监控" ], "summary": "重置定时任务子任务状态", "parameters": [ { "type": "integer", "description": "任务ID", "name": "task_id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/task/monitor/scheduled/resume": { "post": { "description": "恢复已暂停的定时任务", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务监控" ], "summary": "恢复定时任务", "parameters": [ { "type": "integer", "description": "任务ID", "name": "task_id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/task/monitor/scheduler/stats": { "get": { "description": "获取全局调度器的统计信息,包括活跃任务数、下次运行时间等", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务监控" ], "summary": "获取调度器统计信息", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/task/monitor/system/status": { "get": { "description": "获取任务队列和调度器的整体运行状态", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务监控" ], "summary": "获取任务系统整体状态", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } }, "/task/monitor/task/status": { "get": { "description": "获取任务的详细状态信息,包括可执行的操作", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "任务监控" ], "summary": "获取任务状态详情", "parameters": [ { "type": "integer", "description": "任务ID", "name": "task_id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/result.Result" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/result.Result" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/result.Result" } } } } } }, "definitions": { "controller.CreateTaskRequest": { "type": "object", "required": [ "host_ids", "name", "shell", "type" ], "properties": { "cron_expr": { "type": "string" }, "host_ids": { "type": "string" }, "name": { "type": "string" }, "remark": { "type": "string" }, "shell": { "type": "string" }, "type": { "type": "integer" } } }, "controller.ListResponse": { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/model.TaskAnsible" } }, "total": { "type": "integer" } } }, "controller.SQLRequest": { "type": "object", "properties": { "databaseId": { "description": "数据库ID", "type": "integer" }, "databaseName": { "description": "数据库名称", "type": "string" }, "sql": { "description": "SQL语句", "type": "string" } } }, "model.AccountAuth": { "type": "object", "properties": { "alias": { "description": "别名", "type": "string" }, "createdAt": { "description": "创建时间", "allOf": [ { "$ref": "#/definitions/util.HTime" } ] }, "host": { "description": "IP地址", "type": "string" }, "id": { "type": "integer" }, "name": { "description": "用户名", "type": "string" }, "password": { "description": "密码(加密存储)", "type": "string" }, "port": { "description": "端口", "type": "integer" }, "remark": { "description": "备注", "type": "string" }, "type": { "description": "类型", "type": "integer" }, "updatedAt": { "description": "更新时间", "allOf": [ { "$ref": "#/definitions/util.HTime" } ] } } }, "model.AddLabelRequest": { "type": "object", "required": [ "key", "value" ], "properties": { "key": { "type": "string" }, "value": { "type": "string" } } }, "model.AddSysAdminDto": { "type": "object", "required": [ "deptId", "email", "nickname", "password", "phone", "postId", "roleId", "status", "username" ], "properties": { "deptId": { "description": "部门id", "type": "integer" }, "email": { "description": "邮箱", "type": "string" }, "nickname": { "description": "昵称", "type": "string" }, "note": { "description": "备注", "type": "string" }, "password": { "description": "密码", "type": "string" }, "phone": { "description": "手机号", "type": "string" }, "postId": { "description": "岗位id", "type": "integer" }, "roleId": { "description": "角色id", "type": "integer" }, "status": { "description": "状态:1-\u003e启用,2-\u003e禁用", "type": "integer" }, "username": { "description": "用户名", "type": "string" } } }, "model.AddSysRoleDto": { "type": "object", "properties": { "description": { "description": "描述", "type": "string" }, "roleKey": { "description": "角色key", "type": "string" }, "roleName": { "description": "角色名称", "type": "string" }, "status": { "description": "状态:1-\u003e启用,2-\u003e禁用", "type": "integer" } } }, "model.AddTaintRequest": { "type": "object", "required": [ "effect", "key" ], "properties": { "effect": { "type": "string", "enum": [ "NoSchedule", "PreferNoSchedule", "NoExecute" ] }, "key": { "type": "string" }, "value": { "type": "string" } } }, "model.AddToolDto": { "type": "object", "required": [ "link", "title" ], "properties": { "icon": { "description": "导航图标", "type": "string" }, "link": { "description": "链接地址", "type": "string", "maxLength": 500 }, "sort": { "description": "排序", "type": "integer" }, "title": { "description": "导航标题", "type": "string", "maxLength": 100, "minLength": 1 } } }, "model.AgentHeartbeatDto": { "type": "object", "properties": { "hostname": { "description": "Agent所在主机的hostname", "type": "string" }, "ip": { "description": "Agent所在主机的IP地址 (内网IP)", "type": "string" }, "pid": { "description": "Agent进程ID", "type": "integer" }, "port": { "description": "Agent监听端口", "type": "integer" }, "token": { "description": "认证token", "type": "string" } } }, "model.AppEnvironmentResponse": { "type": "object", "properties": { "app_code": { "description": "应用编码", "type": "string" }, "app_id": { "description": "应用ID", "type": "integer" }, "app_name": { "description": "应用名称", "type": "string" }, "business_dept_id": { "description": "业务部门ID", "type": "integer" }, "business_group_id": { "description": "业务组ID", "type": "integer" }, "environment": { "description": "环境名称", "type": "string" }, "is_configured": { "description": "是否已配置", "type": "boolean" }, "jenkins_job_url": { "description": "Jenkins任务URL", "type": "string" }, "jenkins_server_id": { "description": "Jenkins服务器ID", "type": "integer" }, "jenkins_server_name": { "description": "Jenkins服务器名称", "type": "string" }, "job_name": { "description": "Jenkins任务名称", "type": "string" }, "programming_lang": { "description": "编程语言", "type": "string" }, "status": { "description": "应用状态", "type": "integer" }, "status_text": { "description": "应用状态文本", "type": "string" } } }, "model.Application": { "type": "object", "properties": { "business_dept_id": { "description": "业务部门ID(关联sys_dept)", "type": "integer" }, "business_group_id": { "description": "基本信息", "type": "integer" }, "code": { "description": "应用编码", "type": "string" }, "created_at": { "type": "string" }, "databases": { "description": "关联数据库(cmdb_sql表ID)", "type": "array", "items": { "type": "integer" } }, "description": { "description": "应用介绍", "type": "string" }, "dev_owners": { "description": "负责人信息 (多个用户ID,关联sys_admin表)", "type": "array", "items": { "type": "integer" } }, "domains": { "description": "关联资源 (存储资源ID)", "type": "array", "items": { "type": "string" } }, "health_api": { "description": "健康检查接口", "type": "string" }, "hosts": { "description": "关联主机(cmdb_host表ID)", "type": "array", "items": { "type": "integer" } }, "id": { "type": "integer" }, "jenkins_envs": { "description": "关联的Jenkins环境配置(级联删除)", "type": "array", "items": { "$ref": "#/definitions/model.JenkinsEnv" } }, "name": { "description": "应用名称", "type": "string" }, "ops_owners": { "description": "运维负责人", "type": "array", "items": { "type": "integer" } }, "other_res": { "description": "关联其他资源", "allOf": [ { "$ref": "#/definitions/model.OtherResources" } ] }, "programming_lang": { "description": "技术信息", "type": "string" }, "repo_url": { "description": "仓库地址", "type": "string" }, "start_command": { "description": "启动命令", "type": "string" }, "status": { "description": "状态", "type": "integer" }, "stop_command": { "description": "停止命令", "type": "string" }, "test_owners": { "description": "测试负责人", "type": "array", "items": { "type": "integer" } }, "updated_at": { "type": "string" } } }, "model.ApplicationForDeployment": { "type": "object", "properties": { "can_deploy": { "description": "是否可以部署", "type": "boolean" }, "code": { "description": "应用编码", "type": "string" }, "environment": { "description": "环境名称", "type": "string" }, "id": { "description": "应用ID", "type": "integer" }, "jenkins_env_id": { "description": "Jenkins环境配置ID", "type": "integer" }, "job_name": { "description": "Jenkins任务名称", "type": "string" }, "name": { "description": "应用名称", "type": "string" }, "reason": { "description": "不能部署的原因", "type": "string" } } }, "model.ApplicationListResponse": { "type": "object", "properties": { "list": { "description": "列表", "type": "array", "items": { "$ref": "#/definitions/model.Application" } }, "total": { "description": "总数", "type": "integer" } } }, "model.AssetCategoryStats": { "type": "object", "properties": { "category": { "description": "资产分类名称 (主机/数据库/K8s集群)", "type": "string" }, "items": { "description": "具体资产项统计", "type": "array", "items": { "$ref": "#/definitions/model.AssetItemStats" } }, "total": { "description": "该分类总数", "type": "integer" } } }, "model.AssetItemStats": { "type": "object", "properties": { "count": { "description": "数量", "type": "integer" }, "name": { "description": "资产项名称 (自建主机/阿里云/MySQL等)", "type": "string" } } }, "model.AssetStats": { "type": "object", "properties": { "categories": { "description": "资产分类统计", "type": "array", "items": { "$ref": "#/definitions/model.AssetCategoryStats" } }, "totalAssets": { "description": "总资产数量", "type": "integer" } } }, "model.BatchDeleteSysOperationLogDto": { "type": "object", "properties": { "ids": { "description": "id列表", "type": "array", "items": { "type": "integer" } } } }, "model.BatchDeployAgentDto": { "type": "object", "required": [ "hostIds" ], "properties": { "hostIds": { "description": "主机ID列表", "type": "array", "items": { "type": "integer" } }, "version": { "description": "版本", "type": "string" } } }, "model.BuildAction": { "type": "object", "properties": { "_class": { "description": "操作类型", "type": "string" } } }, "model.BuildExecutor": { "type": "object", "properties": { "node": { "description": "节点名称", "type": "string" }, "number": { "description": "执行器编号", "type": "integer" } } }, "model.BusinessDistributionStats": { "type": "object", "properties": { "businessLines": { "description": "业务线列表", "type": "array", "items": { "$ref": "#/definitions/model.BusinessLineStats" } }, "totalServices": { "description": "总服务数量", "type": "integer" } } }, "model.BusinessLineServiceTree": { "type": "object", "properties": { "business_group_id": { "description": "业务组ID", "type": "integer" }, "business_group_name": { "description": "业务组名称", "type": "string" }, "service_count": { "description": "服务数量", "type": "integer" }, "services": { "description": "服务列表", "type": "array", "items": { "$ref": "#/definitions/model.ServiceTreeNode" } } } }, "model.BusinessLineStats": { "type": "object", "properties": { "id": { "description": "业务组ID", "type": "integer" }, "name": { "description": "业务线名称", "type": "string" }, "percentage": { "description": "占比", "type": "number" }, "serviceCount": { "description": "服务数量", "type": "integer" } } }, "model.ChangeSet": { "type": "object", "properties": { "items": { "description": "变更项目", "type": "array", "items": { "$ref": "#/definitions/model.ChangeSetItem" } }, "kind": { "description": "变更类型", "type": "string" } } }, "model.ChangeSetItem": { "type": "object", "properties": { "affectedPaths": { "description": "影响路径", "type": "array", "items": { "type": "string" } }, "author": { "description": "作者", "allOf": [ { "$ref": "#/definitions/model.User" } ] }, "comment": { "description": "提交注释", "type": "string" }, "date": { "description": "提交日期", "type": "string" }, "id": { "description": "提交ID", "type": "string" }, "msg": { "description": "提交消息", "type": "string" }, "timestamp": { "description": "时间戳", "type": "integer" } } }, "model.ClusterDetailResponse": { "type": "object", "properties": { "cluster": { "$ref": "#/definitions/model.KubeCluster" }, "components": { "description": "安装的组件", "type": "array", "items": { "$ref": "#/definitions/model.ComponentInfo" } }, "events": { "description": "集群事件", "type": "array", "items": { "$ref": "#/definitions/model.ClusterEvent" } }, "monitoring": { "description": "监控信息", "allOf": [ { "$ref": "#/definitions/model.MonitoringInfo" } ] }, "network": { "description": "网络配置", "allOf": [ { "$ref": "#/definitions/model.NetworkInfo" } ] }, "nodes": { "type": "array", "items": { "$ref": "#/definitions/model.NodeInfo" } }, "runtime": { "description": "运行时信息", "allOf": [ { "$ref": "#/definitions/model.RuntimeSummary" } ] }, "summary": { "$ref": "#/definitions/model.ClusterSummary" }, "workloads": { "description": "工作负载统计", "allOf": [ { "$ref": "#/definitions/model.WorkloadSummary" } ] } } }, "model.ClusterEvent": { "type": "object", "properties": { "count": { "description": "发生次数", "type": "integer" }, "firstTime": { "description": "首次时间", "type": "string" }, "involvedObject": { "description": "相关对象", "type": "string" }, "lastTime": { "description": "最后时间", "type": "string" }, "message": { "description": "消息", "type": "string" }, "reason": { "description": "原因", "type": "string" }, "source": { "description": "事件源", "type": "string" }, "type": { "description": "事件类型", "type": "string" } } }, "model.ClusterResourceMetrics": { "type": "object", "properties": { "available": { "description": "可用量", "type": "string" }, "requestRate": { "description": "请求率 (0-100)", "type": "number" }, "total": { "description": "总量", "type": "string" }, "usageRate": { "description": "使用率 (0-100)", "type": "number" }, "used": { "description": "已使用", "type": "string" } } }, "model.ClusterSummary": { "type": "object", "properties": { "masterNodes": { "type": "integer" }, "readyNodes": { "type": "integer" }, "totalNodes": { "type": "integer" }, "workerNodes": { "type": "integer" } } }, "model.CmdbGroup": { "type": "object", "properties": { "children": { "description": "子分组(虚拟字段,用于树形展示)", "type": "array", "items": { "$ref": "#/definitions/model.CmdbGroup" } }, "createTime": { "description": "创建时间", "allOf": [ { "$ref": "#/definitions/util.HTime" } ] }, "hostCount": { "description": "主机数量(虚拟字段,包含所有子分组的主机数量)", "type": "integer" }, "hosts": { "description": "关联的主机列表", "type": "array", "items": { "$ref": "#/definitions/model.CmdbHost" } }, "id": { "description": "主键ID", "type": "integer" }, "name": { "description": "分组名称", "type": "string" }, "parentId": { "description": "父级分组ID(0 表示根分组)", "type": "integer" } } }, "model.CmdbGroupIdDto": { "type": "object", "properties": { "id": { "description": "ID", "type": "integer" } } }, "model.CmdbHost": { "type": "object", "properties": { "billingType": { "type": "string" }, "cpu": { "type": "string" }, "createTime": { "$ref": "#/definitions/util.HTime" }, "disk": { "type": "string" }, "expireTime": { "$ref": "#/definitions/util.HTime" }, "group": { "$ref": "#/definitions/model.CmdbGroup" }, "groupId": { "type": "integer" }, "hostName": { "type": "string" }, "id": { "type": "integer" }, "instanceId": { "type": "string" }, "memory": { "type": "string" }, "name": { "type": "string" }, "os": { "type": "string" }, "privateIp": { "type": "string" }, "publicIp": { "type": "string" }, "region": { "type": "string" }, "remark": { "type": "string" }, "sshIp": { "type": "string" }, "sshKeyId": { "type": "integer" }, "sshName": { "type": "string" }, "sshPort": { "type": "integer" }, "status": { "type": "integer" }, "updateTime": { "$ref": "#/definitions/util.HTime" }, "vendor": { "type": "integer" } } }, "model.CmdbHostIdDto": { "type": "object", "properties": { "id": { "type": "integer" } } }, "model.CmdbSQL": { "type": "object", "properties": { "accountId": { "description": "所属账号ID", "type": "integer" }, "createdAt": { "description": "创建时间", "allOf": [ { "$ref": "#/definitions/util.HTime" } ] }, "description": { "description": "描述/备注", "type": "string" }, "groupId": { "description": "所属业务组ID", "type": "integer" }, "id": { "description": "主键ID", "type": "integer" }, "name": { "description": "数据库名称", "type": "string" }, "tags": { "description": "标签(多个标签用逗号分隔)", "type": "string" }, "type": { "description": "数据库类型(1=MySQL 2=PostgreSQL 3=Redis 4=MongoDB 5=Elasticsearch)", "type": "integer" }, "updatedAt": { "description": "更新时间", "allOf": [ { "$ref": "#/definitions/util.HTime" } ] } } }, "model.CmdbSqlLogIdDto": { "type": "object", "properties": { "id": { "description": "ID", "type": "integer" } } }, "model.ComponentInfo": { "type": "object", "properties": { "name": { "description": "组件名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "status": { "description": "状态", "type": "string" }, "type": { "description": "组件类型 (system/addon)", "type": "string" }, "version": { "description": "版本", "type": "string" } } }, "model.ConfigMapDetail": { "type": "object", "properties": { "binaryData": { "description": "二进制数据", "type": "object", "additionalProperties": { "type": "array", "items": { "type": "integer", "format": "int32" } } }, "createdTime": { "description": "创建时间", "type": "string" }, "data": { "description": "数据", "type": "object", "additionalProperties": { "type": "string" } }, "events": { "description": "相关事件", "type": "array", "items": { "$ref": "#/definitions/model.K8sEvent" } }, "immutable": { "description": "是否不可变", "type": "boolean" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "ConfigMap名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "spec": { "description": "完整规格配置" }, "usage": { "description": "使用情况(哪些Pod在使用)", "type": "array", "items": { "type": "string" } } } }, "model.ConfigMapListResponse": { "type": "object", "properties": { "configMaps": { "type": "array", "items": { "$ref": "#/definitions/model.K8sConfigMap" } }, "total": { "type": "integer" } } }, "model.ContainerInfo": { "type": "object", "properties": { "env": { "description": "环境变量", "type": "array", "items": { "$ref": "#/definitions/model.EnvVar" } }, "image": { "description": "镜像", "type": "string" }, "name": { "description": "容器名称", "type": "string" }, "ports": { "description": "端口配置", "type": "array", "items": { "$ref": "#/definitions/model.ContainerPort" } }, "ready": { "description": "就绪状态", "type": "boolean" }, "resources": { "description": "资源配置", "allOf": [ { "$ref": "#/definitions/model.WorkloadResources" } ] }, "restartCount": { "description": "重启次数", "type": "integer" }, "state": { "description": "状态", "type": "string" } } }, "model.ContainerMetricsInfo": { "type": "object", "properties": { "limits": { "description": "资源限制量", "allOf": [ { "$ref": "#/definitions/model.ResourceUsage" } ] }, "name": { "description": "容器名称", "type": "string" }, "requests": { "description": "资源请求量", "allOf": [ { "$ref": "#/definitions/model.ResourceUsage" } ] }, "restartCount": { "description": "重启次数", "type": "integer" }, "state": { "description": "容器状态", "type": "string" }, "usage": { "description": "资源使用量", "allOf": [ { "$ref": "#/definitions/model.ResourceUsage" } ] }, "usageRate": { "description": "使用率", "allOf": [ { "$ref": "#/definitions/model.ResourceUsageRate" } ] } } }, "model.ContainerPort": { "type": "object", "properties": { "containerPort": { "description": "容器端口", "type": "integer" }, "name": { "description": "端口名称", "type": "string" }, "protocol": { "description": "协议", "type": "string" } } }, "model.ContainerSpec": { "type": "object", "required": [ "image", "name" ], "properties": { "args": { "description": "启动参数", "type": "array", "items": { "type": "string" } }, "command": { "description": "启动命令", "type": "array", "items": { "type": "string" } }, "env": { "description": "环境变量", "type": "array", "items": { "$ref": "#/definitions/model.EnvVar" } }, "image": { "description": "镜像", "type": "string" }, "name": { "description": "容器名称", "type": "string" }, "ports": { "description": "端口配置", "type": "array", "items": { "$ref": "#/definitions/model.ContainerPort" } }, "resources": { "description": "资源配置", "allOf": [ { "$ref": "#/definitions/model.WorkloadResources" } ] }, "volumeMounts": { "description": "存储卷挂载", "type": "array", "items": { "$ref": "#/definitions/model.VolumeMount" } } } }, "model.ContainerStatus": { "type": "object", "properties": { "image": { "description": "镜像", "type": "string" }, "name": { "description": "容器名称", "type": "string" }, "ready": { "description": "就绪状态", "type": "boolean" }, "restartCount": { "description": "重启次数", "type": "integer" }, "state": { "description": "状态", "type": "string" } } }, "model.CordonNodeRequest": { "type": "object", "properties": { "reason": { "type": "string" }, "unschedulable": { "type": "boolean" } } }, "model.CreateApplicationRequest": { "type": "object", "required": [ "business_dept_id", "business_group_id", "name" ], "properties": { "business_dept_id": { "description": "业务部门ID", "type": "integer" }, "business_group_id": { "description": "业务组ID", "type": "integer" }, "code": { "description": "应用编码(可选,不提供则根据名称自动生成)", "type": "string" }, "databases": { "description": "关联数据库ID", "type": "array", "items": { "type": "integer" } }, "description": { "description": "应用介绍", "type": "string" }, "dev_owners": { "description": "负责人信息", "type": "array", "items": { "type": "integer" } }, "domains": { "description": "关联资源", "type": "array", "items": { "type": "string" } }, "health_api": { "description": "健康检查接口", "type": "string" }, "hosts": { "description": "关联主机ID", "type": "array", "items": { "type": "integer" } }, "jenkins_envs": { "description": "Jenkins环境配置(可选,如果不提供则创建默认的3套环境:prod, test, dev)", "type": "array", "items": { "$ref": "#/definitions/model.CreateJenkinsEnvRequest" } }, "name": { "description": "应用名称", "type": "string" }, "ops_owners": { "description": "运维负责人ID数组", "type": "array", "items": { "type": "integer" } }, "other_res": { "description": "其他资源", "allOf": [ { "$ref": "#/definitions/model.OtherResources" } ] }, "programming_lang": { "description": "技术信息", "type": "string" }, "repo_url": { "description": "仓库地址", "type": "string" }, "start_command": { "description": "启动命令", "type": "string" }, "stop_command": { "description": "停止命令", "type": "string" }, "test_owners": { "description": "测试负责人ID数组", "type": "array", "items": { "type": "integer" } } } }, "model.CreateCmdbHostCloudDto": { "type": "object", "required": [ "accessKey", "groupId", "region", "secretKey", "vendor" ], "properties": { "accessKey": { "description": "AK", "type": "string" }, "groupId": { "description": "分组ID", "type": "integer" }, "instanceId": { "description": "实例ID(可选)", "type": "string" }, "region": { "description": "区域", "type": "string" }, "secretKey": { "description": "SK", "type": "string" }, "vendor": { "description": "云厂商:2-\u003e阿里云,3-\u003e腾讯云", "type": "integer" } } }, "model.CreateCmdbHostDto": { "type": "object", "required": [ "groupId", "hostName", "sshIp", "sshKeyId", "sshName" ], "properties": { "groupId": { "description": "主机分组ID", "type": "integer" }, "hostName": { "description": "主机名称(唯一标识)", "type": "string" }, "remark": { "description": "备注信息(可选)", "type": "string" }, "sshIp": { "description": "SSH连接IP(公网或私网IP)", "type": "string" }, "sshKeyId": { "description": "SSH凭据ID(从ecsAuth表获取)", "type": "integer" }, "sshName": { "description": "SSH登录用户名", "type": "string" }, "sshPort": { "description": "SSH端口(默认22)", "type": "integer" } } }, "model.CreateConfigMapRequest": { "type": "object", "required": [ "name" ], "properties": { "binaryData": { "description": "二进制数据", "type": "object", "additionalProperties": { "type": "array", "items": { "type": "integer", "format": "int32" } } }, "data": { "description": "数据", "type": "object", "additionalProperties": { "type": "string" } }, "immutable": { "description": "是否不可变", "type": "boolean" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "ConfigMap名称", "type": "string" } } }, "model.CreateDeployDto": { "type": "object", "required": [ "hostId", "installDir", "serviceId", "version" ], "properties": { "autoStart": { "description": "是否自动启动", "type": "boolean" }, "envVars": { "description": "环境变量", "type": "object", "additionalProperties": true }, "hostId": { "description": "主机ID", "type": "integer" }, "installDir": { "description": "安装目录", "type": "string" }, "serviceId": { "description": "服务ID (如: mysql)", "type": "string" }, "version": { "description": "版本 (如: 5.7)", "type": "string" } } }, "model.CreateDeploymentRequest": { "type": "object", "required": [ "name", "template" ], "properties": { "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "Deployment名称", "type": "string" }, "replicas": { "description": "副本数,默认1", "type": "integer" }, "strategy": { "description": "部署策略", "allOf": [ { "$ref": "#/definitions/model.DeploymentStrategy" } ] }, "template": { "description": "Pod模板", "allOf": [ { "$ref": "#/definitions/model.PodTemplateSpec" } ] } } }, "model.CreateEcsPasswordAuthDto": { "type": "object", "required": [ "name", "password", "port", "type", "username" ], "properties": { "name": { "description": "凭证名称", "type": "string" }, "password": { "description": "密码", "type": "string" }, "port": { "description": "端口号", "type": "integer" }, "publicKey": { "description": "公钥", "type": "string" }, "remark": { "description": "备注", "type": "string" }, "type": { "description": "认证类型:1-\u003e密码", "type": "integer" }, "username": { "description": "用户名", "type": "string" } } }, "model.CreateIngressRequest": { "type": "object", "required": [ "name", "rules" ], "properties": { "annotations": { "description": "注释", "type": "object", "additionalProperties": { "type": "string" } }, "class": { "description": "Ingress类", "type": "string" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "Ingress名称", "type": "string" }, "rules": { "description": "路由规则", "type": "array", "items": { "$ref": "#/definitions/model.IngressRuleSpec" } }, "tls": { "description": "TLS配置", "type": "array", "items": { "$ref": "#/definitions/model.IngressTLSSpec" } } } }, "model.CreateJenkinsEnvRequest": { "type": "object", "required": [ "env_name" ], "properties": { "app_id": { "description": "应用ID(由控制器自动设置)", "type": "integer" }, "env_name": { "description": "环境名称", "type": "string" }, "jenkins_server_id": { "description": "Jenkins服务器ID(关联account_auth表)", "type": "integer" }, "job_name": { "description": "Jenkins任务名称", "type": "string" } } }, "model.CreateKeyManageDto": { "type": "object", "required": [ "keyId", "keySecret", "keyType" ], "properties": { "keyId": { "description": "密钥ID", "type": "string" }, "keySecret": { "description": "密钥Secret", "type": "string" }, "keyType": { "description": "云厂商类型:1=阿里云,2=腾讯云,3=百度云,4=华为云,5=AWS云", "type": "integer" }, "remark": { "description": "备注信息", "type": "string" } } }, "model.CreateKubeClusterRequest": { "type": "object", "required": [ "name" ], "properties": { "autoDeploy": { "description": "是否自动部署", "type": "boolean" }, "clusterType": { "description": "集群类型:1-自建,2-导入(默认为自建)", "type": "integer" }, "deploymentMode": { "description": "部署模式:1-单Master,2-多Master", "type": "integer" }, "description": { "description": "集群描述", "type": "string" }, "enabledComponents": { "description": "启用组件", "type": "array", "items": { "type": "string" } }, "kubeconfig": { "description": "导入集群参数", "type": "string" }, "name": { "description": "集群名称", "type": "string" }, "nodeConfig": { "description": "节点配置", "allOf": [ { "$ref": "#/definitions/model.NodeConfig" } ] }, "privateRegistry": { "description": "私有镜像仓库地址(兼容旧版本)", "type": "string" }, "registryConfig": { "description": "镜像仓库配置(新版本)", "allOf": [ { "$ref": "#/definitions/model.RegistryConfig" } ] }, "registryPassword": { "description": "镜像仓库密码(兼容旧版本)", "type": "string" }, "registryUsername": { "description": "镜像仓库用户名(兼容旧版本)", "type": "string" }, "taskDescription": { "description": "任务描述", "type": "string" }, "taskName": { "description": "任务名称", "type": "string" }, "version": { "description": "自建集群参数", "type": "string" } } }, "model.CreateLimitRangeRequest": { "type": "object", "required": [ "name", "spec" ], "properties": { "name": { "description": "LimitRange名称", "type": "string" }, "spec": { "description": "LimitRange规格", "allOf": [ { "$ref": "#/definitions/model.LimitRangeRequestSpec" } ] } } }, "model.CreateNamespaceRequest": { "type": "object", "required": [ "name" ], "properties": { "annotations": { "description": "注释", "type": "object", "additionalProperties": { "type": "string" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "命名空间名称", "type": "string" } } }, "model.CreatePVCRequest": { "type": "object", "required": [ "accessModes", "name", "resources" ], "properties": { "accessModes": { "description": "访问模式", "type": "array", "items": { "type": "string" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "PVC名称", "type": "string" }, "resources": { "description": "资源配置", "allOf": [ { "$ref": "#/definitions/model.PVCResourcesSpec" } ] }, "selector": { "description": "标签选择器", "allOf": [ { "$ref": "#/definitions/model.PVCSelectorSpec" } ] }, "storageClass": { "description": "存储类名称", "type": "string" }, "volumeMode": { "description": "卷模式", "type": "string" } } }, "model.CreatePVRequest": { "type": "object", "required": [ "accessModes", "capacity", "name", "persistentVolumeSource" ], "properties": { "accessModes": { "description": "访问模式", "type": "array", "items": { "type": "string" } }, "capacity": { "description": "容量", "type": "object", "additionalProperties": { "type": "string" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "mountOptions": { "description": "挂载选项", "type": "array", "items": { "type": "string" } }, "name": { "description": "PV名称", "type": "string" }, "nodeAffinity": { "description": "节点亲和性", "allOf": [ { "$ref": "#/definitions/model.PVNodeAffinity" } ] }, "persistentVolumeSource": { "description": "存储源", "allOf": [ { "$ref": "#/definitions/model.PVSourceSpec" } ] }, "reclaimPolicy": { "description": "回收策略", "type": "string" }, "storageClassName": { "description": "存储类名称", "type": "string" }, "volumeMode": { "description": "卷模式", "type": "string" } } }, "model.CreatePodFromYAMLRequest": { "type": "object", "required": [ "yamlContent" ], "properties": { "dryRun": { "description": "是否只进行校验不实际创建", "type": "boolean" }, "validateOnly": { "description": "是否只校验YAML格式", "type": "boolean" }, "yamlContent": { "description": "YAML内容", "type": "string" } } }, "model.CreatePodFromYAMLResponse": { "type": "object", "properties": { "message": { "description": "响应消息", "type": "string" }, "namespace": { "description": "Pod所在的命名空间", "type": "string" }, "parsedObject": { "description": "解析的对象信息", "type": "object", "additionalProperties": true }, "podName": { "description": "创建的Pod名称", "type": "string" }, "success": { "description": "是否创建成功", "type": "boolean" }, "validationResult": { "description": "校验结果(DryRun时返回)", "allOf": [ { "$ref": "#/definitions/model.ValidateYAMLResponse" } ] } } }, "model.CreateQuickDeploymentRequest": { "type": "object", "required": [ "applications", "business_dept_id", "business_group_id", "title" ], "properties": { "applications": { "description": "应用列表", "type": "array", "items": { "$ref": "#/definitions/model.QuickDeploymentAppRequest" } }, "business_dept_id": { "description": "业务部门ID", "type": "integer" }, "business_group_id": { "description": "业务组ID", "type": "integer" }, "description": { "description": "发布描述", "type": "string" }, "title": { "description": "发布标题", "type": "string" } } }, "model.CreateResourceQuotaRequest": { "type": "object", "required": [ "hard", "name" ], "properties": { "hard": { "description": "硬限制", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "ResourceQuota名称", "type": "string" }, "scopeSelector": { "description": "作用域选择器", "type": "object", "additionalProperties": true }, "scopes": { "description": "作用域", "type": "array", "items": { "type": "string" } } } }, "model.CreateSecretRequest": { "type": "object", "required": [ "name" ], "properties": { "data": { "description": "数据(base64编码)", "type": "object", "additionalProperties": { "type": "array", "items": { "type": "integer", "format": "int32" } } }, "immutable": { "description": "是否不可变", "type": "boolean" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "Secret名称", "type": "string" }, "stringData": { "description": "字符串数据", "type": "object", "additionalProperties": { "type": "string" } }, "type": { "description": "Secret类型", "type": "string" } } }, "model.CreateServiceRequest": { "type": "object", "required": [ "name", "ports", "selector", "type" ], "properties": { "externalIPs": { "description": "外部IP列表", "type": "array", "items": { "type": "string" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "服务名称", "type": "string" }, "ports": { "description": "端口配置", "type": "array", "items": { "$ref": "#/definitions/model.ServicePortSpec" } }, "selector": { "description": "选择器", "type": "object", "additionalProperties": { "type": "string" } }, "type": { "description": "服务类型", "type": "string" } } }, "model.CreateStorageClassRequest": { "type": "object", "required": [ "name", "provisioner" ], "properties": { "allowVolumeExpansion": { "description": "允许卷扩展", "type": "boolean" }, "allowedTopologies": { "description": "允许的拓扑", "type": "array", "items": { "$ref": "#/definitions/model.StorageClassTopology" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "mountOptions": { "description": "挂载选项", "type": "array", "items": { "type": "string" } }, "name": { "description": "存储类名称", "type": "string" }, "parameters": { "description": "参数", "type": "object", "additionalProperties": { "type": "string" } }, "provisioner": { "description": "提供者", "type": "string" }, "reclaimPolicy": { "description": "回收策略", "type": "string" }, "volumeBindingMode": { "description": "卷绑定模式", "type": "string" } } }, "model.CreateSyncScheduleDto": { "type": "object", "required": [ "cronExpr", "keyTypes", "name" ], "properties": { "cronExpr": { "description": "cron表达式", "type": "string" }, "keyTypes": { "description": "要同步的云厂商类型(JSON数组格式:[1,2,3])", "type": "string" }, "name": { "description": "配置名称", "type": "string" }, "remark": { "description": "备注信息", "type": "string" }, "status": { "description": "状态:1=启用,0=禁用", "type": "integer" } } }, "model.DashboardStats": { "type": "object", "properties": { "databaseStats": { "description": "数据库统计", "allOf": [ { "$ref": "#/definitions/model.DatabaseStats" } ] }, "deploymentStats": { "description": "发布统计", "allOf": [ { "$ref": "#/definitions/model.DeploymentStats" } ] }, "hostStats": { "description": "主机统计", "allOf": [ { "$ref": "#/definitions/model.HostStats" } ] }, "k8sClusterStats": { "description": "K8s集群统计", "allOf": [ { "$ref": "#/definitions/model.K8sClusterStats" } ] }, "serviceStats": { "description": "服务统计", "allOf": [ { "$ref": "#/definitions/model.ServiceStats" } ] }, "taskStats": { "description": "任务统计", "allOf": [ { "$ref": "#/definitions/model.TaskStats" } ] } } }, "model.DatabaseStats": { "type": "object", "properties": { "byType": { "description": "按类型统计", "type": "object", "additionalProperties": { "type": "integer" } }, "total": { "description": "数据库总数", "type": "integer" } } }, "model.DelSysLoginInfoDto": { "type": "object", "properties": { "ids": { "description": "Id列表", "type": "array", "items": { "type": "integer" } } } }, "model.DelSysPostDto": { "type": "object", "properties": { "ids": { "description": "Id列表", "type": "array", "items": { "type": "integer" } } } }, "model.DeploymentRevision": { "type": "object", "properties": { "annotations": { "description": "注释", "type": "object", "additionalProperties": { "type": "string" } }, "changeReason": { "description": "变更原因", "type": "string" }, "creationTime": { "description": "创建时间", "type": "string" }, "images": { "description": "镜像列表", "type": "array", "items": { "type": "string" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "replicasSummary": { "description": "副本统计", "allOf": [ { "$ref": "#/definitions/model.ReplicasSummary" } ] }, "revision": { "description": "版本号", "type": "integer" }, "status": { "description": "版本状态 (current/historical)", "type": "string" } } }, "model.DeploymentRevisionDetail": { "type": "object", "properties": { "annotations": { "description": "注释", "type": "object", "additionalProperties": { "type": "string" } }, "changeReason": { "description": "变更原因", "type": "string" }, "conditions": { "description": "状态条件", "type": "array", "items": { "$ref": "#/definitions/model.WorkloadCondition" } }, "creationTime": { "description": "创建时间", "type": "string" }, "events": { "description": "相关事件", "type": "array", "items": { "$ref": "#/definitions/model.K8sEvent" } }, "images": { "description": "镜像列表", "type": "array", "items": { "type": "string" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "podTemplate": { "description": "Pod模板", "allOf": [ { "$ref": "#/definitions/model.PodTemplateSpec" } ] }, "replicaSets": { "description": "关联的ReplicaSet信息", "type": "array", "items": { "$ref": "#/definitions/model.ReplicaSetInfo" } }, "replicasSummary": { "description": "副本统计", "allOf": [ { "$ref": "#/definitions/model.ReplicasSummary" } ] }, "revision": { "description": "版本号", "type": "integer" }, "status": { "description": "版本状态 (current/historical)", "type": "string" }, "strategy": { "description": "部署策略", "allOf": [ { "$ref": "#/definitions/model.DeploymentStrategy" } ] } } }, "model.DeploymentRolloutHistoryResponse": { "type": "object", "properties": { "currentRevision": { "description": "当前版本号", "type": "integer" }, "deploymentName": { "description": "Deployment名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "revisions": { "description": "版本列表", "type": "array", "items": { "$ref": "#/definitions/model.DeploymentRevision" } }, "totalRevisions": { "description": "总版本数", "type": "integer" } } }, "model.DeploymentRolloutStatusResponse": { "type": "object", "properties": { "availableReplicas": { "description": "可用副本数", "type": "integer" }, "conditions": { "description": "状态条件", "type": "array", "items": { "$ref": "#/definitions/model.WorkloadCondition" } }, "currentRevision": { "description": "当前版本号", "type": "integer" }, "deploymentName": { "description": "Deployment名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "observedGeneration": { "description": "观察到的代数", "type": "integer" }, "paused": { "description": "是否已暂停", "type": "boolean" }, "progressDeadline": { "description": "进度截止时间", "type": "integer" }, "readyReplicas": { "description": "就绪副本数", "type": "integer" }, "rolloutComplete": { "description": "是否滚动发布完成", "type": "boolean" }, "status": { "description": "总体状态 (Progressing/Complete/Failed/Paused)", "type": "string" }, "strategy": { "description": "部署策略", "allOf": [ { "$ref": "#/definitions/model.DeploymentStrategy" } ] }, "updatedReplicas": { "description": "已更新副本数", "type": "integer" } } }, "model.DeploymentStats": { "type": "object", "properties": { "failed": { "description": "失败次数", "type": "integer" }, "success": { "description": "成功次数", "type": "integer" }, "successRate": { "description": "成功率", "type": "number" }, "total": { "description": "发布总次数", "type": "integer" } } }, "model.DeploymentStrategy": { "type": "object", "properties": { "rollingUpdate": { "description": "滚动更新配置", "allOf": [ { "$ref": "#/definitions/model.RollingUpdateDeployment" } ] }, "type": { "description": "策略类型", "type": "string" } } }, "model.DrainNodeRequest": { "type": "object", "properties": { "deleteLocalData": { "description": "删除本地数据", "type": "boolean" }, "force": { "description": "强制驱逐", "type": "boolean" }, "gracePeriodSeconds": { "description": "优雅终止时间", "type": "integer" }, "ignoreDaemonSets": { "description": "忽略DaemonSet", "type": "boolean" } } }, "model.EcsAuthIdDto": { "type": "object", "properties": { "id": { "description": "ID", "type": "integer" } } }, "model.EcsAuthVo": { "type": "object", "properties": { "createTime": { "$ref": "#/definitions/util.HTime" }, "id": { "type": "integer" }, "name": { "type": "string" }, "password": { "type": "string" }, "port": { "type": "integer" }, "publicKey": { "type": "string" }, "remark": { "type": "string" }, "type": { "type": "integer" }, "username": { "type": "string" } } }, "model.EndpointPort": { "type": "object", "properties": { "name": { "description": "端口名称", "type": "string" }, "port": { "description": "端口号", "type": "integer" }, "protocol": { "description": "协议", "type": "string" } } }, "model.EnvVar": { "type": "object", "properties": { "name": { "description": "变量名", "type": "string" }, "value": { "description": "变量值", "type": "string" } } }, "model.EventInfo": { "type": "object", "properties": { "count": { "type": "integer" }, "firstTime": { "type": "string" }, "lastTime": { "type": "string" }, "message": { "type": "string" }, "reason": { "type": "string" }, "type": { "type": "string" } } }, "model.EventListResponse": { "type": "object", "properties": { "events": { "description": "事件列表", "type": "array", "items": { "$ref": "#/definitions/model.K8sEvent" } }, "filter": { "description": "过滤条件", "type": "object", "additionalProperties": { "type": "string" } }, "namespace": { "description": "命名空间(如果是命名空间级别的查询)", "type": "string" }, "total": { "description": "事件总数", "type": "integer" } } }, "model.ExecuteQuickDeploymentRequest": { "type": "object", "required": [ "deployment_id" ], "properties": { "deployment_id": { "description": "发布ID", "type": "integer" }, "execution_mode": { "description": "执行模式: 1=并行(默认) 2=串行", "type": "integer", "default": 1, "enum": [ 1, 2 ] } } }, "model.GetBuildLogResponse": { "type": "object", "properties": { "buildNumber": { "description": "构建编号", "type": "integer" }, "hasMore": { "description": "是否有更多日志", "type": "boolean" }, "jobName": { "description": "任务名称", "type": "string" }, "log": { "description": "日志内容", "type": "string" }, "moreData": { "description": "是否有更多数据", "type": "boolean" }, "server": { "description": "服务器名称", "type": "string" }, "textSize": { "description": "文本大小", "type": "integer" } } }, "model.GetWorkloadYAMLResponse": { "type": "object", "properties": { "message": { "description": "响应消息", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "success": { "description": "是否获取成功", "type": "boolean" }, "workloadName": { "description": "工作负载名称", "type": "string" }, "workloadType": { "description": "工作负载类型", "type": "string" }, "yamlContent": { "description": "YAML内容", "type": "string" } } }, "model.HostStats": { "type": "object", "properties": { "offline": { "description": "离线数量", "type": "integer" }, "online": { "description": "在线数量", "type": "integer" }, "total": { "description": "主机总数", "type": "integer" } } }, "model.IngressBackend": { "type": "object", "properties": { "service": { "description": "服务后端", "allOf": [ { "$ref": "#/definitions/model.IngressServiceBackend" } ] } } }, "model.IngressDetail": { "type": "object", "properties": { "class": { "description": "Ingress类/控制器类型", "type": "string" }, "controllerName": { "description": "Controller名称", "type": "string" }, "controllerVersion": { "description": "Controller版本", "type": "string" }, "createdAt": { "description": "创建时间", "type": "string" }, "endpoints": { "description": "访问端点", "type": "array", "items": { "type": "string" } }, "events": { "description": "相关事件", "type": "array", "items": { "$ref": "#/definitions/model.K8sEvent" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "loadBalancer": { "description": "负载均衡器信息", "allOf": [ { "$ref": "#/definitions/model.IngressLoadBalancer" } ] }, "name": { "description": "Ingress名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "rules": { "description": "路由规则", "type": "array", "items": { "$ref": "#/definitions/model.IngressRule" } }, "spec": { "description": "完整规格配置" }, "status": { "description": "状态", "type": "string" }, "tls": { "description": "TLS配置", "type": "array", "items": { "$ref": "#/definitions/model.IngressTLS" } }, "type": { "description": "Ingress类型:公网Nginx/内网Nginx等", "type": "string" } } }, "model.IngressListResponse": { "type": "object", "properties": { "ingresses": { "type": "array", "items": { "$ref": "#/definitions/model.K8sIngress" } }, "total": { "type": "integer" } } }, "model.IngressLoadBalancer": { "type": "object", "properties": { "ingress": { "description": "入口信息", "type": "array", "items": { "$ref": "#/definitions/model.IngressLoadBalancerIngress" } } } }, "model.IngressLoadBalancerIngress": { "type": "object", "properties": { "hostname": { "description": "主机名", "type": "string" }, "ip": { "description": "IP地址", "type": "string" }, "ports": { "description": "端口信息", "type": "array", "items": { "$ref": "#/definitions/model.IngressLoadBalancerPort" } } } }, "model.IngressLoadBalancerPort": { "type": "object", "properties": { "port": { "description": "端口号", "type": "integer" }, "protocol": { "description": "协议", "type": "string" } } }, "model.IngressPath": { "type": "object", "properties": { "backend": { "description": "后端服务", "allOf": [ { "$ref": "#/definitions/model.IngressBackend" } ] }, "path": { "description": "路径", "type": "string" }, "pathType": { "description": "路径类型 Exact/Prefix/ImplementationSpecific", "type": "string" } } }, "model.IngressPathSpec": { "type": "object", "required": [ "path", "pathType", "serviceName", "servicePort" ], "properties": { "path": { "description": "路径", "type": "string" }, "pathType": { "description": "路径类型", "type": "string" }, "serviceName": { "description": "服务名称", "type": "string" }, "servicePort": { "description": "服务端口", "type": "integer" } } }, "model.IngressRule": { "type": "object", "properties": { "host": { "description": "主机名", "type": "string" }, "http": { "description": "HTTP规则", "allOf": [ { "$ref": "#/definitions/model.IngressRuleValue" } ] } } }, "model.IngressRuleSpec": { "type": "object", "required": [ "host", "paths" ], "properties": { "host": { "description": "主机名", "type": "string" }, "paths": { "description": "路径规则", "type": "array", "items": { "$ref": "#/definitions/model.IngressPathSpec" } } } }, "model.IngressRuleValue": { "type": "object", "properties": { "paths": { "description": "路径规则", "type": "array", "items": { "$ref": "#/definitions/model.IngressPath" } } } }, "model.IngressServiceBackend": { "type": "object", "properties": { "name": { "description": "服务名称", "type": "string" }, "port": { "description": "服务端口", "allOf": [ { "$ref": "#/definitions/model.IngressServicePort" } ] } } }, "model.IngressServicePort": { "type": "object", "properties": { "name": { "description": "端口名称", "type": "string" }, "number": { "description": "端口号", "type": "integer" } } }, "model.IngressTLS": { "type": "object", "properties": { "hosts": { "description": "主机列表", "type": "array", "items": { "type": "string" } }, "secretName": { "description": "证书Secret名称", "type": "string" } } }, "model.IngressTLSSpec": { "type": "object", "required": [ "hosts", "secretName" ], "properties": { "hosts": { "description": "主机列表", "type": "array", "items": { "type": "string" } }, "secretName": { "description": "证书Secret名称", "type": "string" } } }, "model.JenkinsBuild": { "type": "object", "properties": { "actions": { "description": "构建操作", "type": "array", "items": { "$ref": "#/definitions/model.BuildAction" } }, "building": { "description": "是否正在构建", "type": "boolean" }, "changeSet": { "description": "变更集", "allOf": [ { "$ref": "#/definitions/model.ChangeSet" } ] }, "culprits": { "description": "责任人", "type": "array", "items": { "$ref": "#/definitions/model.User" } }, "description": { "description": "构建描述", "type": "string" }, "displayName": { "description": "显示名称", "type": "string" }, "duration": { "description": "构建时长(毫秒)", "type": "integer" }, "estimatedDuration": { "description": "预计时长(毫秒)", "type": "integer" }, "executor": { "description": "执行器信息", "allOf": [ { "$ref": "#/definitions/model.BuildExecutor" } ] }, "fullDisplayName": { "description": "完整显示名称", "type": "string" }, "keepLog": { "description": "是否保留日志", "type": "boolean" }, "number": { "description": "构建编号", "type": "integer" }, "queueId": { "description": "队列ID", "type": "integer" }, "result": { "description": "构建结果 SUCCESS/FAILURE/UNSTABLE/ABORTED", "type": "string" }, "timestamp": { "description": "开始时间戳", "type": "integer" }, "url": { "description": "构建URL", "type": "string" } } }, "model.JenkinsBuildDetailResponse": { "type": "object", "properties": { "build": { "$ref": "#/definitions/model.JenkinsBuild" }, "log": { "description": "构建日志", "type": "string" }, "server": { "description": "服务器名称", "type": "string" } } }, "model.JenkinsComputer": { "type": "object", "properties": { "displayName": { "description": "显示名称", "type": "string" }, "executors": { "description": "执行器列表", "type": "array", "items": { "$ref": "#/definitions/model.JenkinsExecutor" } }, "icon": { "description": "图标", "type": "string" }, "iconClassName": { "description": "图标类名", "type": "string" }, "idle": { "description": "是否空闲", "type": "boolean" }, "jnlpAgent": { "description": "是否JNLP代理", "type": "boolean" }, "launchSupported": { "description": "是否支持启动", "type": "boolean" }, "loadStatistics": { "description": "负载统计", "allOf": [ { "$ref": "#/definitions/model.JenkinsLoadStatistics" } ] }, "manualLaunchAllowed": { "description": "是否允许手动启动", "type": "boolean" }, "monitorData": { "description": "监控数据", "type": "object", "additionalProperties": true }, "numExecutors": { "description": "执行器数量", "type": "integer" }, "offline": { "description": "是否离线", "type": "boolean" }, "offlineCause": { "description": "离线原因" }, "oneOffExecutors": { "description": "一次性执行器", "type": "array", "items": { "$ref": "#/definitions/model.JenkinsExecutor" } }, "temporarilyOffline": { "description": "是否临时离线", "type": "boolean" } } }, "model.JenkinsEnv": { "type": "object", "properties": { "app_id": { "description": "应用ID", "type": "integer" }, "application": { "description": "关联", "allOf": [ { "$ref": "#/definitions/model.Application" } ] }, "created_at": { "type": "string" }, "env_name": { "description": "环境名称", "type": "string" }, "id": { "type": "integer" }, "jenkins_server_id": { "description": "Jenkins服务器ID(关联account_auth)", "type": "integer" }, "job_name": { "description": "Jenkins任务名称", "type": "string" }, "updated_at": { "type": "string" } } }, "model.JenkinsExecutor": { "type": "object", "properties": { "currentExecutable": { "description": "当前执行的任务" }, "currentWorkUnit": { "description": "当前工作单元" }, "idle": { "description": "是否空闲", "type": "boolean" }, "likelyStuck": { "description": "是否可能卡住", "type": "boolean" }, "number": { "description": "执行器编号", "type": "integer" }, "progress": { "description": "进度", "type": "integer" } } }, "model.JenkinsJob": { "type": "object", "properties": { "_class": { "description": "任务类型", "type": "string" }, "actions": { "description": "任务操作", "type": "array", "items": { "$ref": "#/definitions/model.JobAction" } }, "buildable": { "description": "是否可构建", "type": "boolean" }, "color": { "description": "状态颜色(blue/red/yellow等)", "type": "string" }, "description": { "description": "任务描述", "type": "string" }, "displayName": { "description": "显示名称", "type": "string" }, "lastBuild": { "description": "最后一次构建", "allOf": [ { "$ref": "#/definitions/model.JenkinsBuild" } ] }, "lastFailedBuild": { "description": "最后一次失败构建", "allOf": [ { "$ref": "#/definitions/model.JenkinsBuild" } ] }, "lastStableBuild": { "description": "最后一次稳定构建", "allOf": [ { "$ref": "#/definitions/model.JenkinsBuild" } ] }, "lastSuccessfulBuild": { "description": "最后一次成功构建", "allOf": [ { "$ref": "#/definitions/model.JenkinsBuild" } ] }, "name": { "description": "任务名称", "type": "string" }, "property": { "description": "任务属性", "type": "array", "items": { "$ref": "#/definitions/model.JobProperty" } }, "url": { "description": "任务URL", "type": "string" } } }, "model.JenkinsJobDetailResponse": { "type": "object", "properties": { "builds": { "description": "构建历史", "type": "array", "items": { "$ref": "#/definitions/model.JenkinsBuild" } }, "job": { "$ref": "#/definitions/model.JenkinsJob" }, "server": { "description": "服务器名称", "type": "string" } } }, "model.JenkinsJobListResponse": { "type": "object", "properties": { "jobs": { "type": "array", "items": { "$ref": "#/definitions/model.JenkinsJob" } }, "server": { "description": "服务器名称", "type": "string" }, "total": { "type": "integer" } } }, "model.JenkinsLabel": { "type": "object", "properties": { "name": { "description": "标签名称", "type": "string" } } }, "model.JenkinsLoadStatistics": { "type": "object", "properties": { "busyExecutors": { "description": "忙碌执行器数", "type": "integer" }, "idleExecutors": { "description": "空闲执行器数", "type": "integer" }, "queueLength": { "description": "队列长度", "type": "integer" }, "totalExecutors": { "description": "总执行器数", "type": "integer" } } }, "model.JenkinsQueue": { "type": "object", "properties": { "items": { "description": "队列项目", "type": "array", "items": { "$ref": "#/definitions/model.JenkinsQueueItem" } } } }, "model.JenkinsQueueItem": { "type": "object", "properties": { "actions": { "description": "操作", "type": "array", "items": {} }, "blocked": { "description": "是否阻塞", "type": "boolean" }, "buildable": { "description": "是否可构建", "type": "boolean" }, "buildableStartMilliseconds": { "description": "可构建开始时间", "type": "integer" }, "id": { "description": "队列项目ID", "type": "integer" }, "inQueueSince": { "description": "入队时间", "type": "integer" }, "params": { "description": "参数", "type": "string" }, "stuck": { "description": "是否卡住", "type": "boolean" }, "task": { "description": "任务信息", "allOf": [ { "$ref": "#/definitions/model.JenkinsTask" } ] }, "url": { "description": "URL", "type": "string" }, "why": { "description": "等待原因", "type": "string" } } }, "model.JenkinsServerInfo": { "type": "object", "properties": { "alias": { "description": "别名(服务器名称)", "type": "string" }, "createdAt": { "description": "创建时间", "type": "string" }, "description": { "description": "描述(备注)", "type": "string" }, "host": { "description": "Jenkins服务器地址", "type": "string" }, "id": { "description": "账号ID", "type": "integer" }, "port": { "description": "端口", "type": "integer" }, "updatedAt": { "description": "更新时间", "type": "string" }, "username": { "description": "用户名", "type": "string" } } }, "model.JenkinsServerListResponse": { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/model.JenkinsServerInfo" } }, "total": { "type": "integer" } } }, "model.JenkinsServerOption": { "type": "object", "properties": { "id": { "description": "服务器ID", "type": "integer" }, "name": { "description": "服务器名称(别名)", "type": "string" } } }, "model.JenkinsSystemInfo": { "type": "object", "properties": { "assignedLabels": { "description": "分配的标签", "type": "array", "items": { "$ref": "#/definitions/model.JenkinsLabel" } }, "computers": { "description": "计算机列表", "type": "array", "items": { "$ref": "#/definitions/model.JenkinsComputer" } }, "mode": { "description": "运行模式", "type": "string" }, "nodeDescription": { "description": "节点描述", "type": "string" }, "nodeName": { "description": "节点名称", "type": "string" }, "numExecutors": { "description": "执行器数量", "type": "integer" }, "overallLoad": { "description": "总体负载", "type": "object", "additionalProperties": { "type": "integer" } }, "primaryView": { "description": "主视图", "allOf": [ { "$ref": "#/definitions/model.JenkinsView" } ] }, "unlabeledLoad": { "description": "未标记负载", "type": "object", "additionalProperties": { "type": "integer" } }, "useCrumbs": { "description": "是否使用CSRF保护", "type": "boolean" }, "useSecurity": { "description": "是否使用安全", "type": "boolean" }, "version": { "description": "Jenkins版本", "type": "string" }, "views": { "description": "视图列表", "type": "array", "items": { "$ref": "#/definitions/model.JenkinsView" } } } }, "model.JenkinsTask": { "type": "object", "properties": { "color": { "description": "任务颜色", "type": "string" }, "name": { "description": "任务名称", "type": "string" }, "url": { "description": "任务URL", "type": "string" } } }, "model.JenkinsView": { "type": "object", "properties": { "description": { "description": "视图描述", "type": "string" }, "jobs": { "description": "视图中的任务", "type": "array", "items": { "$ref": "#/definitions/model.JenkinsJob" } }, "name": { "description": "视图名称", "type": "string" }, "url": { "description": "视图URL", "type": "string" } } }, "model.JobAction": { "type": "object", "properties": { "_class": { "description": "操作类型", "type": "string" } } }, "model.JobProperty": { "type": "object", "properties": { "_class": { "description": "属性类型", "type": "string" } } }, "model.K8sClusterStats": { "type": "object", "properties": { "healthy": { "description": "健康数量", "type": "integer" }, "offline": { "description": "离线数量", "type": "integer" }, "total": { "description": "集群总数", "type": "integer" } } }, "model.K8sConfigMap": { "type": "object", "properties": { "binaryData": { "description": "二进制数据", "type": "object", "additionalProperties": { "type": "array", "items": { "type": "integer", "format": "int32" } } }, "createdTime": { "description": "创建时间", "type": "string" }, "data": { "description": "数据", "type": "object", "additionalProperties": { "type": "string" } }, "immutable": { "description": "是否不可变", "type": "boolean" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "ConfigMap名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" } } }, "model.K8sEvent": { "type": "object", "properties": { "count": { "description": "发生次数", "type": "integer" }, "firstTime": { "description": "首次时间", "type": "string" }, "lastTime": { "description": "最后时间", "type": "string" }, "message": { "description": "消息", "type": "string" }, "reason": { "description": "原因", "type": "string" }, "source": { "description": "事件源", "type": "string" }, "type": { "description": "事件类型", "type": "string" } } }, "model.K8sIngress": { "type": "object", "properties": { "class": { "description": "Ingress类/控制器类型", "type": "string" }, "controllerName": { "description": "Controller名称", "type": "string" }, "controllerVersion": { "description": "Controller版本", "type": "string" }, "createdAt": { "description": "创建时间", "type": "string" }, "endpoints": { "description": "访问端点", "type": "array", "items": { "type": "string" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "loadBalancer": { "description": "负载均衡器信息", "allOf": [ { "$ref": "#/definitions/model.IngressLoadBalancer" } ] }, "name": { "description": "Ingress名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "rules": { "description": "路由规则", "type": "array", "items": { "$ref": "#/definitions/model.IngressRule" } }, "status": { "description": "状态", "type": "string" }, "tls": { "description": "TLS配置", "type": "array", "items": { "$ref": "#/definitions/model.IngressTLS" } }, "type": { "description": "Ingress类型:公网Nginx/内网Nginx等", "type": "string" } } }, "model.K8sNamespace": { "type": "object", "properties": { "annotations": { "description": "注释", "type": "object", "additionalProperties": { "type": "string" } }, "createdAt": { "description": "创建时间", "type": "string" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "limitRanges": { "description": "默认资源限制列表", "type": "array", "items": { "$ref": "#/definitions/model.LimitRangeDetail" } }, "name": { "description": "命名空间名称", "type": "string" }, "resourceCount": { "description": "资源统计", "allOf": [ { "$ref": "#/definitions/model.NamespaceResourceCount" } ] }, "resourceQuotas": { "description": "资源配额列表", "type": "array", "items": { "$ref": "#/definitions/model.ResourceQuotaDetail" } }, "status": { "description": "状态 Active/Terminating", "type": "string" } } }, "model.K8sNode": { "type": "object", "properties": { "conditions": { "description": "节点状态详细条件", "type": "array", "items": { "$ref": "#/definitions/model.NodeCondition" } }, "configuration": { "description": "节点配置信息", "allOf": [ { "$ref": "#/definitions/model.NodeConfiguration" } ] }, "createdAt": { "description": "创建时间", "type": "string" }, "externalIP": { "description": "外部IP地址", "type": "string" }, "internalIP": { "description": "内部IP地址", "type": "string" }, "name": { "description": "节点名称", "type": "string" }, "podMetrics": { "description": "容器组统计", "allOf": [ { "$ref": "#/definitions/model.PodMetrics" } ] }, "resources": { "description": "CPU和内存资源", "allOf": [ { "$ref": "#/definitions/model.NodeResources" } ] }, "roles": { "description": "节点角色 control-plane,master 或 worker", "type": "string" }, "runtime": { "description": "运行时和版本信息", "allOf": [ { "$ref": "#/definitions/model.RuntimeInfo" } ] }, "scheduling": { "description": "调度相关信息(污点、是否可调度等)", "allOf": [ { "$ref": "#/definitions/model.NodeSchedulingInfo" } ] }, "status": { "description": "节点状态 Ready/NotReady", "type": "string" } } }, "model.K8sNodeDetail": { "type": "object", "properties": { "conditions": { "description": "节点状态详细条件", "type": "array", "items": { "$ref": "#/definitions/model.NodeCondition" } }, "configuration": { "description": "节点配置信息", "allOf": [ { "$ref": "#/definitions/model.NodeConfiguration" } ] }, "createdAt": { "description": "创建时间", "type": "string" }, "events": { "description": "相关事件", "type": "array", "items": { "$ref": "#/definitions/model.EventInfo" } }, "externalIP": { "description": "外部IP地址", "type": "string" }, "internalIP": { "description": "内部IP地址", "type": "string" }, "metrics": { "description": "详细监控指标", "allOf": [ { "$ref": "#/definitions/model.NodeMetrics" } ] }, "name": { "description": "节点名称", "type": "string" }, "podMetrics": { "description": "容器组统计", "allOf": [ { "$ref": "#/definitions/model.PodMetrics" } ] }, "pods": { "description": "节点上运行的Pod列表", "type": "array", "items": { "$ref": "#/definitions/model.PodInfo" } }, "resources": { "description": "CPU和内存资源", "allOf": [ { "$ref": "#/definitions/model.NodeResources" } ] }, "roles": { "description": "节点角色 control-plane,master 或 worker", "type": "string" }, "runtime": { "description": "运行时和版本信息", "allOf": [ { "$ref": "#/definitions/model.RuntimeInfo" } ] }, "scheduling": { "description": "调度相关信息(污点、是否可调度等)", "allOf": [ { "$ref": "#/definitions/model.NodeSchedulingInfo" } ] }, "status": { "description": "节点状态 Ready/NotReady", "type": "string" } } }, "model.K8sPersistentVolume": { "type": "object", "properties": { "accessModes": { "description": "访问模式", "type": "array", "items": { "type": "string" } }, "capacity": { "description": "总量", "type": "string" }, "claimRef": { "description": "绑定存储声明", "allOf": [ { "$ref": "#/definitions/model.PVClaimRef" } ] }, "createdAt": { "description": "创建时间", "type": "string" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "mountOptions": { "description": "挂载选项", "type": "array", "items": { "type": "string" } }, "name": { "description": "PV名称", "type": "string" }, "nodeAffinity": { "description": "节点亲和性", "allOf": [ { "$ref": "#/definitions/model.PVNodeAffinity" } ] }, "persistentVolumeSource": { "description": "存储源", "allOf": [ { "$ref": "#/definitions/model.PVSource" } ] }, "reclaimPolicy": { "description": "回收策略 Retain/Delete/Recycle", "type": "string" }, "status": { "description": "状态 Available/Bound/Released/Failed", "type": "string" }, "storageClass": { "description": "存储类型", "type": "string" }, "volumeMode": { "description": "卷模式", "type": "string" } } }, "model.K8sPersistentVolumeClaim": { "type": "object", "properties": { "accessModes": { "description": "访问模式", "type": "array", "items": { "type": "string" } }, "capacity": { "description": "总量", "type": "string" }, "createdAt": { "description": "创建时间", "type": "string" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "PVC名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "status": { "description": "状态 Pending/Bound/Lost", "type": "string" }, "storageClass": { "description": "存储类型", "type": "string" }, "volumeMode": { "description": "卷模式 Filesystem/Block", "type": "string" }, "volumeName": { "description": "关联的存储卷", "type": "string" } } }, "model.K8sPodDetail": { "type": "object", "properties": { "conditions": { "description": "Pod状态条件", "type": "array", "items": { "$ref": "#/definitions/model.PodCondition" } }, "containers": { "description": "容器信息", "type": "array", "items": { "$ref": "#/definitions/model.ContainerInfo" } }, "createdAt": { "description": "创建时间", "type": "string" }, "events": { "description": "相关事件", "type": "array", "items": { "$ref": "#/definitions/model.K8sEvent" } }, "hostIP": { "description": "主机IP", "type": "string" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "实例名称", "type": "string" }, "nodeName": { "description": "节点名称", "type": "string" }, "phase": { "description": "阶段", "type": "string" }, "podIP": { "description": "Pod IP", "type": "string" }, "resources": { "description": "资源配置", "allOf": [ { "$ref": "#/definitions/model.WorkloadResources" } ] }, "restartCount": { "description": "重启次数", "type": "integer" }, "runningTime": { "description": "运行时间", "type": "string" }, "spec": { "description": "完整规格配置" }, "status": { "description": "状态", "type": "string" }, "volumes": { "description": "挂载卷信息", "type": "array", "items": { "$ref": "#/definitions/model.VolumeInfo" } } } }, "model.K8sPodInfo": { "type": "object", "properties": { "containers": { "description": "容器信息", "type": "array", "items": { "$ref": "#/definitions/model.ContainerInfo" } }, "createdAt": { "description": "创建时间", "type": "string" }, "hostIP": { "description": "主机IP", "type": "string" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "实例名称", "type": "string" }, "nodeName": { "description": "节点名称", "type": "string" }, "phase": { "description": "阶段", "type": "string" }, "podIP": { "description": "Pod IP", "type": "string" }, "resources": { "description": "资源配置", "allOf": [ { "$ref": "#/definitions/model.WorkloadResources" } ] }, "restartCount": { "description": "重启次数", "type": "integer" }, "runningTime": { "description": "运行时间", "type": "string" }, "status": { "description": "状态", "type": "string" } } }, "model.K8sSecret": { "type": "object", "properties": { "createdTime": { "description": "创建时间", "type": "string" }, "data": { "description": "数据(base64编码)", "type": "object", "additionalProperties": { "type": "array", "items": { "type": "integer", "format": "int32" } } }, "immutable": { "description": "是否不可变", "type": "boolean" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "Secret名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "stringData": { "description": "字符串数据", "type": "object", "additionalProperties": { "type": "string" } }, "type": { "description": "Secret类型", "type": "string" } } }, "model.K8sService": { "type": "object", "properties": { "clusterIP": { "description": "集群IP", "type": "string" }, "createdAt": { "description": "创建时间", "type": "string" }, "endpoints": { "description": "端点信息", "type": "array", "items": { "$ref": "#/definitions/model.ServiceEndpoint" } }, "externalIPs": { "description": "外部IP列表", "type": "array", "items": { "type": "string" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "服务名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "ports": { "description": "端口配置", "type": "array", "items": { "$ref": "#/definitions/model.ServicePort" } }, "selector": { "description": "选择器", "type": "object", "additionalProperties": { "type": "string" } }, "status": { "description": "状态", "type": "string" }, "type": { "description": "服务类型 ClusterIP/NodePort/LoadBalancer/ExternalName", "type": "string" } } }, "model.K8sStorageClass": { "type": "object", "properties": { "allowVolumeExpansion": { "description": "允许卷扩展", "type": "boolean" }, "allowedTopologies": { "description": "允许的拓扑", "type": "array", "items": { "$ref": "#/definitions/model.StorageClassTopology" } }, "createdAt": { "description": "创建时间", "type": "string" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "mountOptions": { "description": "挂载选项", "type": "array", "items": { "type": "string" } }, "name": { "description": "存储类名称", "type": "string" }, "parameters": { "description": "参数", "type": "object", "additionalProperties": { "type": "string" } }, "provisioner": { "description": "提供者", "type": "string" }, "reclaimPolicy": { "description": "回收策略", "type": "string" }, "volumeBindingMode": { "description": "卷绑定模式", "type": "string" } } }, "model.K8sWorkload": { "type": "object", "properties": { "createdAt": { "description": "创建时间", "type": "string" }, "images": { "description": "镜像列表", "type": "array", "items": { "type": "string" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "readyReplicas": { "description": "就绪副本数", "type": "integer" }, "replicas": { "description": "副本数", "type": "integer" }, "resources": { "description": "资源配置", "allOf": [ { "$ref": "#/definitions/model.WorkloadResources" } ] }, "status": { "description": "状态", "type": "string" }, "type": { "description": "类型", "allOf": [ { "$ref": "#/definitions/model.WorkloadType" } ] }, "updatedAt": { "description": "更新时间", "type": "string" } } }, "model.K8sWorkloadDetail": { "type": "object", "properties": { "conditions": { "description": "状态条件", "type": "array", "items": { "$ref": "#/definitions/model.WorkloadCondition" } }, "createdAt": { "description": "创建时间", "type": "string" }, "events": { "description": "相关事件", "type": "array", "items": { "$ref": "#/definitions/model.K8sEvent" } }, "images": { "description": "镜像列表", "type": "array", "items": { "type": "string" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "pods": { "description": "Pod列表", "type": "array", "items": { "$ref": "#/definitions/model.K8sPodInfo" } }, "readyReplicas": { "description": "就绪副本数", "type": "integer" }, "replicas": { "description": "副本数", "type": "integer" }, "resources": { "description": "资源配置", "allOf": [ { "$ref": "#/definitions/model.WorkloadResources" } ] }, "spec": { "description": "完整规格配置" }, "status": { "description": "状态", "type": "string" }, "type": { "description": "类型", "allOf": [ { "$ref": "#/definitions/model.WorkloadType" } ] }, "updatedAt": { "description": "更新时间", "type": "string" } } }, "model.KeyManage": { "type": "object", "properties": { "createdAt": { "description": "创建时间", "allOf": [ { "$ref": "#/definitions/util.HTime" } ] }, "id": { "type": "integer" }, "keyId": { "description": "密钥ID(加密存储)", "type": "string" }, "keySecret": { "description": "密钥Secret(加密存储)", "type": "string" }, "keyType": { "description": "云厂商类型:1=阿里云,2=腾讯云,3=百度云,4=华为云,5=AWS云", "type": "integer" }, "remark": { "description": "备注信息", "type": "string" }, "updatedAt": { "description": "更新时间", "allOf": [ { "$ref": "#/definitions/util.HTime" } ] } } }, "model.KubeCluster": { "type": "object", "properties": { "clusterType": { "type": "integer" }, "createdAt": { "type": "string" }, "credential": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "integer" }, "lastSyncAt": { "type": "string" }, "masterNodes": { "type": "integer" }, "name": { "type": "string" }, "nodeCount": { "type": "integer" }, "readyNodes": { "type": "integer" }, "status": { "type": "integer" }, "updatedAt": { "type": "string" }, "version": { "type": "string" }, "workerNodes": { "type": "integer" } } }, "model.KubeClusterListResponse": { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/model.KubeCluster" } }, "total": { "type": "integer" } } }, "model.LimitRangeDetail": { "type": "object", "properties": { "createdAt": { "description": "创建时间", "type": "string" }, "limits": { "description": "限制项列表", "type": "array", "items": { "$ref": "#/definitions/model.LimitRangeItem" } }, "name": { "description": "LimitRange名称", "type": "string" } } }, "model.LimitRangeItem": { "type": "object", "properties": { "default": { "description": "默认值", "type": "object", "additionalProperties": { "type": "string" } }, "defaultRequest": { "description": "默认请求值", "type": "object", "additionalProperties": { "type": "string" } }, "max": { "description": "最大限制", "type": "object", "additionalProperties": { "type": "string" } }, "maxLimitRequestRatio": { "description": "最大限制与请求比率", "type": "object", "additionalProperties": { "type": "string" } }, "min": { "description": "最小限制", "type": "object", "additionalProperties": { "type": "string" } }, "type": { "description": "限制类型 Container/Pod/PersistentVolumeClaim", "type": "string" } } }, "model.LimitRangeListResponse": { "type": "object", "properties": { "limitRanges": { "type": "array", "items": { "$ref": "#/definitions/model.LimitRangeDetail" } }, "total": { "type": "integer" } } }, "model.LimitRangeRequestSpec": { "type": "object", "required": [ "limits" ], "properties": { "limits": { "description": "限制项列表", "type": "array", "items": { "$ref": "#/definitions/model.LimitRangeItem" } } } }, "model.LoginDto": { "type": "object", "required": [ "idKey", "image", "password", "username" ], "properties": { "idKey": { "description": "uuid", "type": "string" }, "image": { "description": "验证码", "type": "string", "maxLength": 6, "minLength": 4 }, "password": { "description": "密码", "type": "string" }, "username": { "description": "用户名", "type": "string" } } }, "model.MonitoringInfo": { "type": "object", "properties": { "cpu": { "description": "CPU监控", "allOf": [ { "$ref": "#/definitions/model.ClusterResourceMetrics" } ] }, "memory": { "description": "内存监控", "allOf": [ { "$ref": "#/definitions/model.ClusterResourceMetrics" } ] }, "network": { "description": "网络监控", "allOf": [ { "$ref": "#/definitions/model.NetworkMetrics" } ] }, "storage": { "description": "存储监控", "allOf": [ { "$ref": "#/definitions/model.StorageMetrics" } ] } } }, "model.NamespaceListResponse": { "type": "object", "properties": { "namespaces": { "type": "array", "items": { "$ref": "#/definitions/model.K8sNamespace" } }, "total": { "type": "integer" } } }, "model.NamespaceMetricsInfo": { "type": "object", "properties": { "namespace": { "description": "命名空间名称", "type": "string" }, "podCount": { "description": "Pod总数", "type": "integer" }, "podMetrics": { "description": "Pod监控列表", "type": "array", "items": { "$ref": "#/definitions/model.PodMetricsSummary" } }, "resourceQuota": { "description": "命名空间资源配额", "allOf": [ { "$ref": "#/definitions/model.NamespaceResourceQuota" } ] }, "runningPods": { "description": "运行中的Pod数", "type": "integer" }, "timestamp": { "description": "采集时间", "type": "string" }, "totalUsage": { "description": "总资源使用量", "allOf": [ { "$ref": "#/definitions/model.ResourceUsage" } ] }, "usageRate": { "description": "资源使用率", "allOf": [ { "$ref": "#/definitions/model.ResourceUsageRate" } ] } } }, "model.NamespaceResourceCount": { "type": "object", "properties": { "configMapCount": { "description": "ConfigMap数量", "type": "integer" }, "podCount": { "description": "Pod数量", "type": "integer" }, "secretCount": { "description": "Secret数量", "type": "integer" }, "serviceCount": { "description": "Service数量", "type": "integer" } } }, "model.NamespaceResourceQuota": { "type": "object", "properties": { "hard": { "description": "硬限制", "allOf": [ { "$ref": "#/definitions/model.ResourceUsage" } ] }, "used": { "description": "已使用", "allOf": [ { "$ref": "#/definitions/model.ResourceUsage" } ] } } }, "model.NetworkInfo": { "type": "object", "properties": { "apiServerEndpoint": { "description": "API Server内网端点", "type": "string" }, "dnsService": { "description": "DNS服务", "type": "string" }, "networkPlugin": { "description": "网络插件", "type": "string" }, "podCIDR": { "description": "Pod CIDR", "type": "string" }, "proxyMode": { "description": "服务转发模式", "type": "string" }, "serviceCIDR": { "description": "Service CIDR", "type": "string" } } }, "model.NetworkMetrics": { "type": "object", "properties": { "inboundTraffic": { "description": "入站流量", "type": "string" }, "outboundTraffic": { "description": "出站流量", "type": "string" }, "packetsIn": { "description": "入站包数", "type": "integer" }, "packetsOut": { "description": "出站包数", "type": "integer" } } }, "model.NodeCondition": { "type": "object", "properties": { "reason": { "type": "string" }, "status": { "type": "string" }, "type": { "type": "string" } } }, "model.NodeConfig": { "type": "object", "required": [ "etcdHostIds", "masterHostIds" ], "properties": { "etcdHostIds": { "description": "ETCD节点主机ID", "type": "array", "items": { "type": "integer" } }, "masterHostIds": { "description": "Master节点主机ID", "type": "array", "items": { "type": "integer" } }, "workerHostIds": { "description": "Worker节点主机ID", "type": "array", "items": { "type": "integer" } } } }, "model.NodeConfiguration": { "type": "object", "properties": { "annotations": { "description": "节点注释", "type": "object", "additionalProperties": { "type": "string" } }, "architecture": { "description": "系统架构", "type": "string" }, "kernelVersion": { "description": "内核版本", "type": "string" }, "labels": { "description": "节点标签", "type": "object", "additionalProperties": { "type": "string" } }, "osImage": { "description": "操作系统镜像", "type": "string" }, "role": { "description": "节点角色 master/worker", "type": "string" } } }, "model.NodeDetailResponse": { "type": "object", "properties": { "allocatable": { "description": "可分配资源", "type": "object", "additionalProperties": { "type": "string" } }, "annotations": { "description": "注释", "type": "object", "additionalProperties": { "type": "string" } }, "architecture": { "description": "架构", "type": "string" }, "bootID": { "description": "启动ID", "type": "string" }, "capacity": { "description": "资源信息", "type": "object", "additionalProperties": { "type": "string" } }, "conditions": { "description": "状态条件", "type": "array", "items": { "$ref": "#/definitions/model.NodeCondition" } }, "containerRuntimeVersion": { "description": "容器运行时版本", "type": "string" }, "createdAt": { "description": "创建时间", "type": "string" }, "externalIP": { "description": "外部IP", "type": "string" }, "hostname": { "description": "主机名", "type": "string" }, "internalIP": { "description": "IP地址信息", "type": "string" }, "kernelVersion": { "description": "内核版本", "type": "string" }, "kubeProxyVersion": { "description": "Kube-Proxy版本", "type": "string" }, "kubeletVersion": { "description": "K8s组件版本", "type": "string" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "machineID": { "description": "机器ID", "type": "string" }, "monitoring": { "description": "监控信息", "allOf": [ { "$ref": "#/definitions/model.NodeMonitoringInfo" } ] }, "name": { "description": "基本信息", "type": "string" }, "operatingSystem": { "description": "操作系统", "type": "string" }, "osImage": { "description": "系统信息", "type": "string" }, "podCIDR": { "description": "CIDR信息", "type": "string" }, "podCIDRs": { "description": "容器组CIDR列表", "type": "array", "items": { "type": "string" } }, "podInfo": { "description": "Pod信息", "allOf": [ { "$ref": "#/definitions/model.NodePodInfo" } ] }, "podList": { "description": "节点上的Pod列表", "type": "array", "items": { "$ref": "#/definitions/model.NodePodDetail" } }, "providerID": { "description": "提供者ID", "type": "string" }, "status": { "description": "状态信息", "type": "string" }, "systemUUID": { "description": "系统UUID", "type": "string" }, "taints": { "description": "污点列表", "type": "array", "items": { "$ref": "#/definitions/model.NodeTaint" } }, "uid": { "description": "UID", "type": "string" }, "unschedulable": { "description": "调度信息", "type": "boolean" } } }, "model.NodeInfo": { "type": "object", "properties": { "allocatable": { "description": "可分配资源", "type": "object", "additionalProperties": { "type": "string" } }, "capacity": { "description": "CPU、内存等资源容量", "type": "object", "additionalProperties": { "type": "string" } }, "conditions": { "description": "节点状态条件", "type": "array", "items": { "$ref": "#/definitions/model.NodeCondition" } }, "externalIP": { "type": "string" }, "internalIP": { "type": "string" }, "name": { "type": "string" }, "os": { "type": "string" }, "role": { "description": "master/worker/etcd", "type": "string" }, "status": { "description": "Ready/NotReady", "type": "string" }, "version": { "type": "string" } } }, "model.NodeMetrics": { "type": "object", "properties": { "cpuUsagePercentage": { "type": "number" }, "diskUsagePercentage": { "type": "number" }, "memoryUsagePercentage": { "type": "number" }, "networkInBytes": { "type": "integer" }, "networkOutBytes": { "type": "integer" } } }, "model.NodeMetricsInfo": { "type": "object", "properties": { "allocatable": { "description": "可分配量", "allOf": [ { "$ref": "#/definitions/model.ResourceUsage" } ] }, "capacity": { "description": "总容量", "allOf": [ { "$ref": "#/definitions/model.ResourceUsage" } ] }, "nodeName": { "description": "节点名称", "type": "string" }, "podCount": { "description": "Pod数量", "type": "integer" }, "podMetrics": { "description": "Pod监控摘要", "type": "array", "items": { "$ref": "#/definitions/model.PodMetricsSummary" } }, "systemInfo": { "description": "系统信息", "allOf": [ { "$ref": "#/definitions/model.NodeSystemInfo" } ] }, "timestamp": { "description": "采集时间", "type": "string" }, "usage": { "description": "资源使用量", "allOf": [ { "$ref": "#/definitions/model.ResourceUsage" } ] }, "usageRate": { "description": "使用率", "allOf": [ { "$ref": "#/definitions/model.ResourceUsageRate" } ] } } }, "model.NodeMonitoringInfo": { "type": "object", "properties": { "cpu": { "description": "CPU使用情况", "allOf": [ { "$ref": "#/definitions/model.NodeResourceUsage" } ] }, "memory": { "description": "内存使用情况", "allOf": [ { "$ref": "#/definitions/model.NodeResourceUsage" } ] }, "network": { "description": "网络使用情况", "allOf": [ { "$ref": "#/definitions/model.NodeNetworkUsage" } ] }, "storage": { "description": "存储使用情况", "allOf": [ { "$ref": "#/definitions/model.NodeResourceUsage" } ] } } }, "model.NodeNetworkUsage": { "type": "object", "properties": { "inboundBytes": { "description": "入站字节数", "type": "integer" }, "inboundPackets": { "description": "入站包数", "type": "integer" }, "outboundBytes": { "description": "出站字节数", "type": "integer" }, "outboundPackets": { "description": "出站包数", "type": "integer" } } }, "model.NodePodDetail": { "type": "object", "properties": { "containers": { "description": "容器状态", "type": "array", "items": { "$ref": "#/definitions/model.ContainerStatus" } }, "cpuLimits": { "description": "CPU限制", "type": "string" }, "cpuRequests": { "description": "CPU请求", "type": "string" }, "createdAt": { "description": "创建时间", "type": "string" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "memoryLimits": { "description": "内存限制", "type": "string" }, "memoryRequests": { "description": "内存请求", "type": "string" }, "name": { "description": "Pod名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "phase": { "description": "阶段", "type": "string" }, "restartCount": { "description": "重启次数", "type": "integer" }, "status": { "description": "状态", "type": "string" } } }, "model.NodePodInfo": { "type": "object", "properties": { "failedPods": { "description": "失败的Pod数", "type": "integer" }, "pendingPods": { "description": "等待中的Pod数", "type": "integer" }, "runningPods": { "description": "运行中的Pod数", "type": "integer" }, "succeededPods": { "description": "成功的Pod数", "type": "integer" }, "totalPods": { "description": "Pod总数", "type": "integer" } } }, "model.NodeResourceAllocation": { "type": "object", "properties": { "allocatable": { "description": "可分配资源", "type": "object", "additionalProperties": { "type": "string" } }, "allocated": { "description": "已分配资源", "type": "object", "additionalProperties": { "type": "string" } }, "capacity": { "description": "节点总容量", "type": "object", "additionalProperties": { "type": "string" } }, "nodeName": { "type": "string" }, "podList": { "description": "Pod资源使用详情", "type": "array", "items": { "$ref": "#/definitions/model.PodResourceInfo" } } } }, "model.NodeResourceUsage": { "type": "object", "properties": { "available": { "description": "可用量", "type": "string" }, "limits": { "description": "限制量", "type": "string" }, "requestRate": { "description": "请求率 (0-100)", "type": "number" }, "requests": { "description": "请求量", "type": "string" }, "total": { "description": "总量", "type": "string" }, "usageRate": { "description": "使用率 (0-100)", "type": "number" }, "used": { "description": "已使用", "type": "string" } } }, "model.NodeResources": { "type": "object", "properties": { "cpu": { "description": "CPU资源", "allOf": [ { "$ref": "#/definitions/model.ResourceInfo" } ] }, "memory": { "description": "内存资源", "allOf": [ { "$ref": "#/definitions/model.ResourceInfo" } ] } } }, "model.NodeSchedulingInfo": { "type": "object", "properties": { "taints": { "description": "节点污点", "type": "array", "items": { "$ref": "#/definitions/model.NodeTaint" } }, "unschedulable": { "description": "是否不可调度", "type": "boolean" } } }, "model.NodeSystemInfo": { "type": "object", "properties": { "architecture": { "description": "系统架构", "type": "string" }, "containerRuntimeVersion": { "description": "容器运行时版本", "type": "string" }, "kernelVersion": { "description": "内核版本", "type": "string" }, "kubeProxyVersion": { "description": "KubeProxy版本", "type": "string" }, "kubeletVersion": { "description": "Kubelet版本", "type": "string" }, "osImage": { "description": "操作系统镜像", "type": "string" } } }, "model.NodeTaint": { "type": "object", "properties": { "effect": { "description": "NoSchedule, PreferNoSchedule, NoExecute", "type": "string" }, "key": { "type": "string" }, "value": { "type": "string" } } }, "model.OtherResources": { "type": "object", "properties": { "kafka": { "type": "array", "items": { "type": "string" } }, "other": { "type": "array", "items": { "type": "string" } }, "rabbitmq": { "type": "array", "items": { "type": "string" } }, "redis": { "type": "array", "items": { "type": "string" } }, "zookeeper": { "type": "array", "items": { "type": "string" } } } }, "model.PVAWSElasticBlockStoreVolumeSource": { "type": "object", "properties": { "fsType": { "description": "文件系统类型", "type": "string" }, "partition": { "description": "分区", "type": "integer" }, "readOnly": { "description": "只读", "type": "boolean" }, "volumeID": { "description": "卷ID", "type": "string" } } }, "model.PVCDetail": { "type": "object", "properties": { "accessModes": { "description": "访问模式", "type": "array", "items": { "type": "string" } }, "capacity": { "description": "总量", "type": "string" }, "createdAt": { "description": "创建时间", "type": "string" }, "events": { "description": "相关事件", "type": "array", "items": { "$ref": "#/definitions/model.K8sEvent" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "PVC名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "spec": { "description": "完整规格配置" }, "status": { "description": "状态 Pending/Bound/Lost", "type": "string" }, "storageClass": { "description": "存储类型", "type": "string" }, "volumeMode": { "description": "卷模式 Filesystem/Block", "type": "string" }, "volumeName": { "description": "关联的存储卷", "type": "string" } } }, "model.PVCListResponse": { "type": "object", "properties": { "pvcs": { "type": "array", "items": { "$ref": "#/definitions/model.K8sPersistentVolumeClaim" } }, "total": { "type": "integer" } } }, "model.PVCMatchExp": { "type": "object", "properties": { "key": { "description": "键", "type": "string" }, "operator": { "description": "操作符", "type": "string" }, "values": { "description": "值", "type": "array", "items": { "type": "string" } } } }, "model.PVCResourcesSpec": { "type": "object", "required": [ "requests" ], "properties": { "limits": { "description": "资源限制", "type": "object", "additionalProperties": { "type": "string" } }, "requests": { "description": "资源请求", "type": "object", "additionalProperties": { "type": "string" } } } }, "model.PVCSIVolumeSource": { "type": "object", "properties": { "driver": { "description": "驱动名称", "type": "string" }, "fsType": { "description": "文件系统类型", "type": "string" }, "readOnly": { "description": "只读", "type": "boolean" }, "volumeAttributes": { "description": "卷属性", "type": "object", "additionalProperties": { "type": "string" } }, "volumeHandle": { "description": "卷句柄", "type": "string" } } }, "model.PVCSelectorSpec": { "type": "object", "properties": { "matchExpressions": { "description": "匹配表达式", "type": "array", "items": { "$ref": "#/definitions/model.PVCMatchExp" } }, "matchLabels": { "description": "匹配标签", "type": "object", "additionalProperties": { "type": "string" } } } }, "model.PVClaimRef": { "type": "object", "properties": { "apiVersion": { "description": "API版本", "type": "string" }, "kind": { "description": "类型", "type": "string" }, "name": { "description": "名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "uid": { "description": "UID", "type": "string" } } }, "model.PVDetail": { "type": "object", "properties": { "accessModes": { "description": "访问模式", "type": "array", "items": { "type": "string" } }, "capacity": { "description": "总量", "type": "string" }, "claimRef": { "description": "绑定存储声明", "allOf": [ { "$ref": "#/definitions/model.PVClaimRef" } ] }, "createdAt": { "description": "创建时间", "type": "string" }, "events": { "description": "相关事件", "type": "array", "items": { "$ref": "#/definitions/model.K8sEvent" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "mountOptions": { "description": "挂载选项", "type": "array", "items": { "type": "string" } }, "name": { "description": "PV名称", "type": "string" }, "nodeAffinity": { "description": "节点亲和性", "allOf": [ { "$ref": "#/definitions/model.PVNodeAffinity" } ] }, "persistentVolumeSource": { "description": "存储源", "allOf": [ { "$ref": "#/definitions/model.PVSource" } ] }, "reclaimPolicy": { "description": "回收策略 Retain/Delete/Recycle", "type": "string" }, "spec": { "description": "完整规格配置" }, "status": { "description": "状态 Available/Bound/Released/Failed", "type": "string" }, "storageClass": { "description": "存储类型", "type": "string" }, "volumeMode": { "description": "卷模式", "type": "string" } } }, "model.PVHostPathVolumeSource": { "type": "object", "properties": { "path": { "description": "主机路径", "type": "string" }, "type": { "description": "类型", "type": "string" } } }, "model.PVISCSIVolumeSource": { "type": "object", "properties": { "fsType": { "description": "文件系统类型", "type": "string" }, "iqn": { "description": "IQN", "type": "string" }, "iscsiInterface": { "description": "iSCSI接口", "type": "string" }, "lun": { "description": "LUN", "type": "integer" }, "portals": { "description": "门户列表", "type": "array", "items": { "type": "string" } }, "readOnly": { "description": "只读", "type": "boolean" }, "targetPortal": { "description": "目标门户", "type": "string" } } }, "model.PVListResponse": { "type": "object", "properties": { "pvs": { "type": "array", "items": { "$ref": "#/definitions/model.K8sPersistentVolume" } }, "total": { "type": "integer" } } }, "model.PVLocalVolumeSource": { "type": "object", "properties": { "fsType": { "description": "文件系统类型", "type": "string" }, "path": { "description": "本地路径", "type": "string" } } }, "model.PVNFSVolumeSource": { "type": "object", "properties": { "path": { "description": "NFS路径", "type": "string" }, "readOnly": { "description": "只读", "type": "boolean" }, "server": { "description": "NFS服务器", "type": "string" } } }, "model.PVNodeAffinity": { "type": "object", "properties": { "required": { "description": "必需的节点选择器", "allOf": [ { "$ref": "#/definitions/model.PVNodeSelector" } ] } } }, "model.PVNodeSelector": { "type": "object", "properties": { "nodeSelectorTerms": { "description": "节点选择器条件", "type": "array", "items": { "$ref": "#/definitions/model.PVNodeSelectorTerm" } } } }, "model.PVNodeSelectorRequirement": { "type": "object", "properties": { "key": { "description": "键", "type": "string" }, "operator": { "description": "操作符", "type": "string" }, "values": { "description": "值", "type": "array", "items": { "type": "string" } } } }, "model.PVNodeSelectorTerm": { "type": "object", "properties": { "matchExpressions": { "description": "匹配表达式", "type": "array", "items": { "$ref": "#/definitions/model.PVNodeSelectorRequirement" } }, "matchFields": { "description": "匹配字段", "type": "array", "items": { "$ref": "#/definitions/model.PVNodeSelectorRequirement" } } } }, "model.PVSource": { "type": "object", "properties": { "awsElasticBlockStore": { "description": "AWS EBS", "allOf": [ { "$ref": "#/definitions/model.PVAWSElasticBlockStoreVolumeSource" } ] }, "csi": { "description": "CSI存储源", "allOf": [ { "$ref": "#/definitions/model.PVCSIVolumeSource" } ] }, "hostPath": { "description": "HostPath存储源", "allOf": [ { "$ref": "#/definitions/model.PVHostPathVolumeSource" } ] }, "iscsi": { "description": "iSCSI存储源", "allOf": [ { "$ref": "#/definitions/model.PVISCSIVolumeSource" } ] }, "local": { "description": "Local存储源", "allOf": [ { "$ref": "#/definitions/model.PVLocalVolumeSource" } ] }, "nfs": { "description": "NFS存储源", "allOf": [ { "$ref": "#/definitions/model.PVNFSVolumeSource" } ] } } }, "model.PVSourceSpec": { "type": "object", "properties": { "awsElasticBlockStore": { "description": "AWS EBS", "allOf": [ { "$ref": "#/definitions/model.PVAWSElasticBlockStoreVolumeSource" } ] }, "csi": { "description": "CSI存储源", "allOf": [ { "$ref": "#/definitions/model.PVCSIVolumeSource" } ] }, "hostPath": { "description": "HostPath存储源", "allOf": [ { "$ref": "#/definitions/model.PVHostPathVolumeSource" } ] }, "iscsi": { "description": "iSCSI存储源", "allOf": [ { "$ref": "#/definitions/model.PVISCSIVolumeSource" } ] }, "local": { "description": "Local存储源", "allOf": [ { "$ref": "#/definitions/model.PVLocalVolumeSource" } ] }, "nfs": { "description": "NFS存储源", "allOf": [ { "$ref": "#/definitions/model.PVNFSVolumeSource" } ] } } }, "model.PauseDeploymentResponse": { "type": "object", "properties": { "deploymentName": { "description": "Deployment名称", "type": "string" }, "message": { "description": "响应消息", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "status": { "description": "当前状态", "type": "string" }, "success": { "description": "是否暂停成功", "type": "boolean" } } }, "model.PodCondition": { "type": "object", "properties": { "lastTransitionTime": { "description": "最后转换时间", "type": "string" }, "message": { "description": "消息", "type": "string" }, "reason": { "description": "原因", "type": "string" }, "status": { "description": "状态", "type": "string" }, "type": { "description": "条件类型", "type": "string" } } }, "model.PodInfo": { "type": "object", "properties": { "cpuUsage": { "type": "string" }, "memUsage": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "status": { "type": "string" } } }, "model.PodMetrics": { "type": "object", "properties": { "allocated": { "description": "已分配的Pod数量", "type": "integer" }, "total": { "description": "总的Pod容量", "type": "integer" } } }, "model.PodMetricsInfo": { "type": "object", "properties": { "containers": { "description": "容器监控信息列表", "type": "array", "items": { "$ref": "#/definitions/model.ContainerMetricsInfo" } }, "namespace": { "description": "命名空间", "type": "string" }, "nodeName": { "description": "节点名称", "type": "string" }, "podName": { "description": "Pod名称", "type": "string" }, "resourceQuota": { "description": "资源配额信息", "allOf": [ { "$ref": "#/definitions/model.PodResourceQuota" } ] }, "timestamp": { "description": "采集时间", "type": "string" }, "totalUsage": { "description": "总使用量", "allOf": [ { "$ref": "#/definitions/model.ResourceUsage" } ] }, "usageRate": { "description": "使用率信息", "allOf": [ { "$ref": "#/definitions/model.ResourceUsageRate" } ] } } }, "model.PodMetricsSummary": { "type": "object", "properties": { "namespace": { "description": "命名空间", "type": "string" }, "podName": { "description": "Pod名称", "type": "string" }, "usage": { "description": "资源使用量", "allOf": [ { "$ref": "#/definitions/model.ResourceUsage" } ] }, "usageRate": { "description": "使用率", "allOf": [ { "$ref": "#/definitions/model.ResourceUsageRate" } ] } } }, "model.PodResourceInfo": { "type": "object", "properties": { "limits": { "type": "object", "additionalProperties": { "type": "string" } }, "name": { "type": "string" }, "namespace": { "type": "string" }, "requests": { "type": "object", "additionalProperties": { "type": "string" } } } }, "model.PodResourceQuota": { "type": "object", "properties": { "limits": { "description": "资源限制量", "allOf": [ { "$ref": "#/definitions/model.ResourceUsage" } ] }, "requests": { "description": "资源请求量", "allOf": [ { "$ref": "#/definitions/model.ResourceUsage" } ] } } }, "model.PodTemplateSpec": { "type": "object", "required": [ "containers" ], "properties": { "containers": { "description": "容器规格", "type": "array", "items": { "$ref": "#/definitions/model.ContainerSpec" } }, "labels": { "description": "Pod标签", "type": "object", "additionalProperties": { "type": "string" } }, "nodeSelector": { "description": "节点选择器", "type": "object", "additionalProperties": { "type": "string" } }, "tolerations": { "description": "容忍度", "type": "array", "items": { "$ref": "#/definitions/model.Toleration" } }, "volumes": { "description": "存储卷规格", "type": "array", "items": { "$ref": "#/definitions/model.VolumeSpec" } } } }, "model.QuickDeployment": { "type": "object", "properties": { "business_dept_id": { "description": "业务部门ID", "type": "integer" }, "business_group_id": { "description": "业务组ID", "type": "integer" }, "created_at": { "type": "string" }, "creator_id": { "description": "创建人ID", "type": "integer" }, "creator_name": { "description": "创建人姓名", "type": "string" }, "description": { "description": "发布描述", "type": "string" }, "duration": { "description": "发布耗时(秒)", "type": "integer" }, "end_time": { "description": "结束发布时间", "type": "string" }, "execution_mode": { "description": "执行模式: 1=并行 2=串行", "type": "integer" }, "id": { "type": "integer" }, "start_time": { "description": "开始发布时间", "type": "string" }, "status": { "description": "发布状态: 1=待发布 2=发布中 3=发布成功 4=发布失败 5=已取消", "type": "integer" }, "task_count": { "description": "任务数量,记录用户提交的发布任务数量", "type": "integer" }, "tasks": { "description": "关联的发布任务", "type": "array", "items": { "$ref": "#/definitions/model.QuickDeploymentTask" } }, "title": { "description": "发布标题", "type": "string" }, "updated_at": { "type": "string" } } }, "model.QuickDeploymentAppRequest": { "type": "object", "required": [ "app_id", "environment" ], "properties": { "app_id": { "description": "应用ID(按数组顺序执行)", "type": "integer" }, "environment": { "description": "应用发布环境", "type": "string" } } }, "model.QuickDeploymentListResponse": { "type": "object", "properties": { "list": { "description": "列表", "type": "array", "items": { "$ref": "#/definitions/model.QuickDeployment" } }, "total": { "description": "总数", "type": "integer" } } }, "model.QuickDeploymentTask": { "type": "object", "properties": { "app_code": { "description": "应用编码", "type": "string" }, "app_id": { "description": "应用ID", "type": "integer" }, "app_name": { "description": "应用名称", "type": "string" }, "application": { "description": "关联", "allOf": [ { "$ref": "#/definitions/model.Application" } ] }, "build_number": { "description": "构建编号", "type": "integer" }, "created_at": { "type": "string" }, "deployment_id": { "description": "发布ID", "type": "integer" }, "duration": { "description": "任务耗时(秒)", "type": "integer" }, "end_time": { "description": "任务结束时间", "type": "string" }, "environment": { "description": "环境名称", "type": "string" }, "error_message": { "description": "错误信息", "type": "string" }, "execute_order": { "description": "执行顺序", "type": "integer" }, "id": { "type": "integer" }, "jenkins_env": { "$ref": "#/definitions/model.JenkinsEnv" }, "jenkins_env_id": { "description": "Jenkins环境配置ID", "type": "integer" }, "jenkins_job_url": { "description": "Jenkins任务URL", "type": "string" }, "log_url": { "description": "日志URL", "type": "string" }, "start_time": { "description": "任务开始时间", "type": "string" }, "status": { "description": "任务状态: 1=未部署 2=部署中 3=成功 4=异常", "type": "integer" }, "updated_at": { "type": "string" } } }, "model.QuotaInfo": { "type": "object", "properties": { "hard": { "description": "限制值", "type": "string" }, "used": { "description": "已使用值", "type": "string" } } }, "model.RegistryConfig": { "type": "object", "properties": { "privateRegistry": { "description": "私有镜像仓库地址", "type": "string" }, "registryPassword": { "description": "镜像仓库密码", "type": "string" }, "registryUsername": { "description": "镜像仓库用户名", "type": "string" }, "usePrivateRegistry": { "description": "是否使用私有仓库", "type": "boolean" } } }, "model.RemoveLabelRequest": { "type": "object", "required": [ "key" ], "properties": { "key": { "type": "string" } } }, "model.RemoveTaintRequest": { "type": "object", "required": [ "key" ], "properties": { "effect": { "type": "string" }, "key": { "type": "string" } } }, "model.ReplicaSetInfo": { "type": "object", "properties": { "createdAt": { "description": "创建时间", "type": "string" }, "name": { "description": "ReplicaSet名称", "type": "string" }, "readyReplicas": { "description": "就绪副本数", "type": "integer" }, "replicas": { "description": "副本数", "type": "integer" }, "revision": { "description": "版本号", "type": "integer" }, "status": { "description": "状态", "type": "string" } } }, "model.ReplicasSummary": { "type": "object", "properties": { "available": { "description": "可用副本数", "type": "integer" }, "current": { "description": "当前副本数", "type": "integer" }, "desired": { "description": "期望副本数", "type": "integer" }, "ready": { "description": "就绪副本数", "type": "integer" }, "updated": { "description": "已更新副本数", "type": "integer" } } }, "model.ResetSysAdminPasswordDto": { "type": "object", "properties": { "id": { "description": "ID", "type": "integer" }, "password": { "description": "密码", "type": "string" } } }, "model.ResourceInfo": { "type": "object", "properties": { "allocatable": { "description": "可分配量", "type": "string" }, "capacity": { "description": "总容量", "type": "string" }, "requests": { "description": "请求量", "type": "string" }, "usage": { "description": "使用量", "type": "string" } } }, "model.ResourceQuotaDetail": { "type": "object", "properties": { "cpuQuota": { "description": "CPU配额详情", "allOf": [ { "$ref": "#/definitions/model.QuotaInfo" } ] }, "createdAt": { "description": "创建时间", "type": "string" }, "hard": { "description": "硬限制", "type": "object", "additionalProperties": { "type": "string" } }, "memoryQuota": { "description": "内存配额详情", "allOf": [ { "$ref": "#/definitions/model.QuotaInfo" } ] }, "name": { "description": "ResourceQuota名称", "type": "string" }, "storageQuota": { "description": "存储配额详情", "allOf": [ { "$ref": "#/definitions/model.QuotaInfo" } ] }, "used": { "description": "已使用", "type": "object", "additionalProperties": { "type": "string" } } } }, "model.ResourceQuotaListResponse": { "type": "object", "properties": { "resourceQuotas": { "type": "array", "items": { "$ref": "#/definitions/model.ResourceQuotaDetail" } }, "total": { "type": "integer" } } }, "model.ResourceSpec": { "type": "object", "properties": { "cpu": { "description": "CPU", "type": "string" }, "memory": { "description": "内存", "type": "string" } } }, "model.ResourceUsage": { "type": "object", "properties": { "cpu": { "description": "CPU使用量 (如: \"100m\", \"1.5\")", "type": "string" }, "memory": { "description": "内存使用量 (如: \"128Mi\", \"1Gi\")", "type": "string" } } }, "model.ResourceUsageRate": { "type": "object", "properties": { "cpuRate": { "description": "CPU使用率 (百分比: 0-100)", "type": "number" }, "memoryRate": { "description": "内存使用率 (百分比: 0-100)", "type": "number" } } }, "model.ResumeDeploymentResponse": { "type": "object", "properties": { "deploymentName": { "description": "Deployment名称", "type": "string" }, "message": { "description": "响应消息", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "status": { "description": "当前状态", "type": "string" }, "success": { "description": "是否恢复成功", "type": "boolean" } } }, "model.RoleMenu": { "type": "object", "required": [ "id", "menuIds" ], "properties": { "id": { "description": "ID", "type": "integer" }, "menuIds": { "description": "菜单id列表", "type": "array", "items": { "type": "integer" } } } }, "model.RollbackDeploymentRequest": { "type": "object", "properties": { "toRevision": { "description": "目标版本号,0表示回滚到上一版本", "type": "integer" } } }, "model.RollbackDeploymentResponse": { "type": "object", "properties": { "deploymentName": { "description": "Deployment名称", "type": "string" }, "fromRevision": { "description": "回滚前版本号", "type": "integer" }, "message": { "description": "响应消息", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "rolloutStatus": { "description": "滚动发布状态", "type": "string" }, "success": { "description": "是否回滚成功", "type": "boolean" }, "toRevision": { "description": "回滚后版本号", "type": "integer" } } }, "model.RollingUpdateDeployment": { "type": "object", "properties": { "maxSurge": { "description": "最大激增数量", "type": "string" }, "maxUnavailable": { "description": "最大不可用数量", "type": "string" } } }, "model.RuntimeInfo": { "type": "object", "properties": { "containerRuntimeVersion": { "description": "容器运行时版本", "type": "string" }, "kubeProxyVersion": { "description": "KubeProxy版本", "type": "string" }, "kubeletVersion": { "description": "Kubelet版本", "type": "string" }, "operatingSystem": { "description": "操作系统", "type": "string" }, "osImage": { "description": "操作系统镜像", "type": "string" } } }, "model.RuntimeSummary": { "type": "object", "properties": { "apiServerVersion": { "description": "API Server版本", "type": "string" }, "containerRuntime": { "description": "容器运行时", "type": "string" }, "coreDNSVersion": { "description": "CoreDNS版本", "type": "string" }, "etcdVersion": { "description": "etcd版本", "type": "string" }, "kubeProxyVersion": { "description": "kube-proxy版本", "type": "string" }, "kubernetesVersion": { "description": "Kubernetes版本", "type": "string" }, "upTime": { "description": "集群运行时间", "type": "string" } } }, "model.ScaleWorkloadRequest": { "type": "object", "required": [ "replicas" ], "properties": { "replicas": { "description": "目标副本数", "type": "integer" } } }, "model.SecretDetail": { "type": "object", "properties": { "createdTime": { "description": "创建时间", "type": "string" }, "data": { "description": "数据(base64编码)", "type": "object", "additionalProperties": { "type": "array", "items": { "type": "integer", "format": "int32" } } }, "events": { "description": "相关事件", "type": "array", "items": { "$ref": "#/definitions/model.K8sEvent" } }, "immutable": { "description": "是否不可变", "type": "boolean" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "Secret名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "spec": { "description": "完整规格配置" }, "stringData": { "description": "字符串数据", "type": "object", "additionalProperties": { "type": "string" } }, "type": { "description": "Secret类型", "type": "string" }, "usage": { "description": "使用情况(哪些Pod在使用)", "type": "array", "items": { "type": "string" } } } }, "model.SecretListResponse": { "type": "object", "properties": { "secrets": { "type": "array", "items": { "$ref": "#/definitions/model.K8sSecret" } }, "total": { "type": "integer" } } }, "model.ServiceDetail": { "type": "object", "properties": { "clusterIP": { "description": "集群IP", "type": "string" }, "createdAt": { "description": "创建时间", "type": "string" }, "endpoints": { "description": "端点信息", "type": "array", "items": { "$ref": "#/definitions/model.ServiceEndpoint" } }, "events": { "description": "相关事件", "type": "array", "items": { "$ref": "#/definitions/model.K8sEvent" } }, "externalIPs": { "description": "外部IP列表", "type": "array", "items": { "type": "string" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "服务名称", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "pods": { "description": "关联的Pod列表", "type": "array", "items": { "$ref": "#/definitions/model.K8sPodInfo" } }, "ports": { "description": "端口配置", "type": "array", "items": { "$ref": "#/definitions/model.ServicePort" } }, "selector": { "description": "选择器", "type": "object", "additionalProperties": { "type": "string" } }, "spec": { "description": "完整规格配置" }, "status": { "description": "状态", "type": "string" }, "type": { "description": "服务类型 ClusterIP/NodePort/LoadBalancer/ExternalName", "type": "string" } } }, "model.ServiceEndpoint": { "type": "object", "properties": { "hostname": { "description": "主机名", "type": "string" }, "ip": { "description": "端点IP", "type": "string" }, "nodeName": { "description": "节点名称", "type": "string" }, "ports": { "description": "端口信息", "type": "array", "items": { "$ref": "#/definitions/model.EndpointPort" } }, "ready": { "description": "就绪状态", "type": "boolean" } } }, "model.ServiceJenkinsEnv": { "type": "object", "properties": { "env_name": { "description": "环境名称", "type": "string" }, "id": { "description": "环境配置ID", "type": "integer" }, "is_configured": { "description": "是否已配置完整", "type": "boolean" }, "jenkins_server_id": { "description": "Jenkins服务器ID", "type": "integer" }, "job_name": { "description": "Jenkins任务名称", "type": "string" } } }, "model.ServiceListResponse": { "type": "object", "properties": { "services": { "type": "array", "items": { "$ref": "#/definitions/model.K8sService" } }, "total": { "type": "integer" } } }, "model.ServicePort": { "type": "object", "properties": { "name": { "description": "端口名称", "type": "string" }, "nodePort": { "description": "节点端口(NodePort类型时使用)", "type": "integer" }, "port": { "description": "服务端口", "type": "integer" }, "protocol": { "description": "协议 TCP/UDP", "type": "string" }, "targetPort": { "description": "目标端口", "type": "string" } } }, "model.ServicePortSpec": { "type": "object", "required": [ "port", "protocol" ], "properties": { "name": { "description": "端口名称", "type": "string" }, "nodePort": { "description": "节点端口(NodePort类型时使用)", "type": "integer" }, "port": { "description": "服务端口", "type": "integer" }, "protocol": { "description": "协议", "type": "string" }, "targetPort": { "description": "目标端口", "type": "string" } } }, "model.ServiceStats": { "type": "object", "properties": { "businessLines": { "description": "业务线数量", "type": "integer" }, "total": { "description": "服务总数", "type": "integer" } } }, "model.ServiceTreeNode": { "type": "object", "properties": { "business_dept_id": { "description": "业务部门ID", "type": "integer" }, "business_dept_name": { "description": "业务部门名称", "type": "string" }, "code": { "description": "应用编码", "type": "string" }, "created_at": { "description": "创建时间", "type": "string" }, "id": { "description": "应用ID", "type": "integer" }, "jenkins_envs": { "description": "Jenkins环境配置", "type": "array", "items": { "$ref": "#/definitions/model.ServiceJenkinsEnv" } }, "name": { "description": "应用名称", "type": "string" }, "programming_lang": { "description": "编程语言", "type": "string" }, "status": { "description": "应用状态", "type": "integer" }, "status_text": { "description": "状态文本", "type": "string" } } }, "model.StartJobRequest": { "type": "object", "properties": { "parameters": { "description": "构建参数", "type": "object", "additionalProperties": { "type": "string" } }, "reason": { "description": "构建原因", "type": "string" } } }, "model.StartJobResponse": { "type": "object", "properties": { "buildNumber": { "description": "构建编号(如果已知)", "type": "integer" }, "jobName": { "description": "任务名称", "type": "string" }, "message": { "description": "响应消息", "type": "string" }, "queueId": { "description": "队列ID", "type": "integer" }, "server": { "description": "服务器名称", "type": "string" }, "success": { "description": "是否启动成功", "type": "boolean" } } }, "model.StopBuildRequest": { "type": "object", "properties": { "reason": { "description": "停止原因", "type": "string" } } }, "model.StopBuildResponse": { "type": "object", "properties": { "buildNumber": { "description": "构建编号", "type": "integer" }, "jobName": { "description": "任务名称", "type": "string" }, "message": { "description": "响应消息", "type": "string" }, "server": { "description": "服务器名称", "type": "string" }, "success": { "description": "是否停止成功", "type": "boolean" } } }, "model.StorageClassDetail": { "type": "object", "properties": { "allowVolumeExpansion": { "description": "允许卷扩展", "type": "boolean" }, "allowedTopologies": { "description": "允许的拓扑", "type": "array", "items": { "$ref": "#/definitions/model.StorageClassTopology" } }, "createdAt": { "description": "创建时间", "type": "string" }, "events": { "description": "相关事件", "type": "array", "items": { "$ref": "#/definitions/model.K8sEvent" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "mountOptions": { "description": "挂载选项", "type": "array", "items": { "type": "string" } }, "name": { "description": "存储类名称", "type": "string" }, "parameters": { "description": "参数", "type": "object", "additionalProperties": { "type": "string" } }, "provisioner": { "description": "提供者", "type": "string" }, "reclaimPolicy": { "description": "回收策略", "type": "string" }, "spec": { "description": "完整规格配置" }, "volumeBindingMode": { "description": "卷绑定模式", "type": "string" } } }, "model.StorageClassListResponse": { "type": "object", "properties": { "storageClasses": { "type": "array", "items": { "$ref": "#/definitions/model.K8sStorageClass" } }, "total": { "type": "integer" } } }, "model.StorageClassTopology": { "type": "object", "properties": { "matchLabelExpressions": { "description": "匹配标签表达式", "type": "array", "items": { "$ref": "#/definitions/model.StorageClassTopologyExp" } } } }, "model.StorageClassTopologyExp": { "type": "object", "properties": { "key": { "description": "键", "type": "string" }, "values": { "description": "值", "type": "array", "items": { "type": "string" } } } }, "model.StorageMetrics": { "type": "object", "properties": { "boundPVs": { "description": "已绑定PV数", "type": "integer" }, "storageClasses": { "description": "存储类列表", "type": "array", "items": { "type": "string" } }, "totalPVCs": { "description": "PVC总数", "type": "integer" }, "totalPVs": { "description": "PV总数", "type": "integer" } } }, "model.SyncSchedule": { "type": "object", "properties": { "createdAt": { "description": "创建时间", "allOf": [ { "$ref": "#/definitions/util.HTime" } ] }, "cronExpr": { "description": "cron表达式", "type": "string" }, "id": { "type": "integer" }, "keyTypes": { "description": "要同步的云厂商类型(JSON数组格式:[1,2,3])", "type": "string" }, "lastRunTime": { "description": "上次执行时间", "allOf": [ { "$ref": "#/definitions/util.HTime" } ] }, "name": { "description": "配置名称", "type": "string" }, "nextRunTime": { "description": "下次执行时间", "allOf": [ { "$ref": "#/definitions/util.HTime" } ] }, "remark": { "description": "备注信息", "type": "string" }, "status": { "description": "状态:1=启用,0=禁用", "type": "integer" }, "syncLog": { "description": "最近一次同步日志", "type": "string" }, "updatedAt": { "description": "更新时间", "allOf": [ { "$ref": "#/definitions/util.HTime" } ] } } }, "model.SysAdminIdDto": { "type": "object", "properties": { "id": { "description": "ID", "type": "integer" } } }, "model.SysDept": { "type": "object", "properties": { "children": { "description": "子集", "type": "array", "items": { "$ref": "#/definitions/model.SysDept" } }, "createTime": { "description": "创建时间", "allOf": [ { "$ref": "#/definitions/util.HTime" } ] }, "deptName": { "description": "部门名称", "type": "string" }, "deptStatus": { "description": "部门状态(1-\u003e正常 2-\u003e停用)", "type": "integer" }, "deptType": { "description": "部门类型(1-\u003e公司, 2-\u003e中心,3-\u003e部门)", "type": "integer" }, "id": { "description": "ID", "type": "integer" }, "parentId": { "description": "父id", "type": "integer" } } }, "model.SysDeptIdDto": { "type": "object", "properties": { "id": { "description": "ID", "type": "integer" } } }, "model.SysLoginInfoIdDto": { "type": "object", "properties": { "id": { "description": "ID", "type": "integer" } } }, "model.SysMenu": { "type": "object", "properties": { "children": { "description": "子集", "type": "array", "items": { "$ref": "#/definitions/model.SysMenu" } }, "createTime": { "description": "创建时间", "allOf": [ { "$ref": "#/definitions/util.HTime" } ] }, "icon": { "description": "菜单图标", "type": "string" }, "id": { "description": "ID", "type": "integer" }, "menuName": { "description": "菜单名称", "type": "string" }, "menuStatus": { "description": "启用状态;1-\u003e禁用;2-\u003e启用", "type": "integer" }, "menuType": { "description": "菜单类型:1-\u003e目录;2-\u003e菜单;3-\u003e按钮", "type": "integer" }, "parentId": { "description": "父菜单id", "type": "integer" }, "sort": { "description": "排序", "type": "integer" }, "url": { "description": "菜单url", "type": "string" }, "value": { "description": "权限值", "type": "string" } } }, "model.SysMenuIdDto": { "type": "object", "properties": { "id": { "description": "ID", "type": "integer" } } }, "model.SysOperationLogIdDto": { "type": "object", "properties": { "id": { "description": "ID", "type": "integer" } } }, "model.SysPost": { "type": "object", "properties": { "createTime": { "description": "创建时间", "allOf": [ { "$ref": "#/definitions/util.HTime" } ] }, "id": { "description": "ID", "type": "integer" }, "postCode": { "description": "岗位编码", "type": "string" }, "postName": { "description": "岗位名称", "type": "string" }, "postStatus": { "description": "状态(1-\u003e正常 2-\u003e停用)", "type": "integer" }, "remark": { "description": "备注", "type": "string" } } }, "model.SysPostIdDto": { "type": "object", "properties": { "id": { "description": "ID", "type": "integer" } } }, "model.SysRoleIdDto": { "type": "object", "properties": { "id": { "description": "ID", "type": "integer" } } }, "model.Task": { "type": "object", "properties": { "created_at": { "type": "string" }, "cron_expr": { "type": "string" }, "duration": { "type": "integer" }, "end_time": { "type": "string" }, "execute_count": { "type": "integer" }, "host_ids": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "next_run_time": { "type": "string" }, "remark": { "type": "string" }, "shell": { "type": "string" }, "start_time": { "type": "string" }, "status": { "type": "integer" }, "task_count": { "type": "integer" }, "tasklog": { "type": "string" }, "type": { "type": "integer" } } }, "model.TaskAnsible": { "type": "object", "properties": { "allHostIDs": { "type": "string" }, "createdAt": { "type": "string" }, "description": { "type": "string" }, "errorMsg": { "type": "string" }, "gitRepo": { "type": "string" }, "globalVars": { "type": "string" }, "hostGroups": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "status": { "type": "integer" }, "taskCount": { "type": "integer" }, "totalDuration": { "type": "integer" }, "type": { "type": "integer" }, "updatedAt": { "type": "string" }, "works": { "type": "array", "items": { "$ref": "#/definitions/model.TaskAnsibleWork" } } } }, "model.TaskAnsibleWork": { "type": "object", "properties": { "duration": { "type": "integer" }, "endTime": { "type": "string" }, "entryFileName": { "type": "string" }, "entryFilePath": { "type": "string" }, "errorMsg": { "type": "string" }, "exitCode": { "type": "integer" }, "id": { "type": "integer" }, "logPath": { "type": "string" }, "startTime": { "type": "string" }, "status": { "type": "integer" }, "task": { "$ref": "#/definitions/model.TaskAnsible" }, "taskID": { "type": "integer" } } }, "model.TaskIDRequest": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer" } } }, "model.TaskStats": { "type": "object", "properties": { "failed": { "description": "失败次数", "type": "integer" }, "success": { "description": "成功次数", "type": "integer" }, "successRate": { "description": "成功率", "type": "number" }, "total": { "description": "任务执行总次数", "type": "integer" } } }, "model.TaskStatusResponse": { "type": "object", "properties": { "app_code": { "description": "应用编码", "type": "string" }, "app_name": { "description": "应用名称", "type": "string" }, "build_number": { "description": "构建编号", "type": "integer" }, "duration": { "description": "耗时(秒)", "type": "integer" }, "end_time": { "description": "结束时间", "type": "string" }, "environment": { "description": "环境名称", "type": "string" }, "error_message": { "description": "错误信息", "type": "string" }, "log_url": { "description": "日志URL", "type": "string" }, "progress": { "description": "进度百分比(0-100)", "type": "integer" }, "start_time": { "description": "开始时间", "type": "string" }, "status": { "description": "任务状态: 1=未部署 2=部署中 3=成功 4=异常", "type": "integer" }, "status_text": { "description": "状态文本", "type": "string" }, "task_id": { "description": "任务ID", "type": "integer" } } }, "model.TaskTemplate": { "type": "object", "properties": { "content": { "description": "任务内容", "type": "string" }, "createdAt": { "description": "创建时间", "type": "string" }, "createdBy": { "description": "创建人", "type": "string" }, "id": { "type": "integer" }, "name": { "description": "任务名称", "type": "string" }, "remark": { "description": "备注信息", "type": "string" }, "type": { "description": "1=shell模板, 2=python模板, 3=ansible模板", "type": "integer" }, "updatedAt": { "description": "更新时间", "type": "string" }, "updatedBy": { "description": "更新人", "type": "string" } } }, "model.TestJenkinsConnectionRequest": { "type": "object", "required": [ "password", "url", "username" ], "properties": { "password": { "description": "密码或API Token", "type": "string" }, "url": { "description": "Jenkins服务器地址", "type": "string" }, "username": { "description": "用户名", "type": "string" } } }, "model.TestJenkinsConnectionResponse": { "type": "object", "properties": { "error": { "description": "错误信息", "type": "string" }, "message": { "description": "响应消息", "type": "string" }, "success": { "description": "是否连接成功", "type": "boolean" }, "systemInfo": { "description": "系统信息", "allOf": [ { "$ref": "#/definitions/model.JenkinsSystemInfo" } ] } } }, "model.Toleration": { "type": "object", "properties": { "effect": { "description": "效果", "type": "string" }, "key": { "description": "键", "type": "string" }, "operator": { "description": "操作符", "type": "string" }, "value": { "description": "值", "type": "string" } } }, "model.UpdateApplicationRequest": { "type": "object", "properties": { "business_dept_id": { "description": "业务部门ID", "type": "integer" }, "business_group_id": { "description": "业务组ID", "type": "integer" }, "databases": { "description": "关联数据库ID", "type": "array", "items": { "type": "integer" } }, "description": { "description": "应用介绍", "type": "string" }, "dev_owners": { "description": "负责人信息", "type": "array", "items": { "type": "integer" } }, "domains": { "description": "关联资源", "type": "array", "items": { "type": "string" } }, "health_api": { "description": "健康检查接口", "type": "string" }, "hosts": { "description": "关联主机ID", "type": "array", "items": { "type": "integer" } }, "jenkins_envs": { "description": "Jenkins环境配置(可选,如果提供则完全替换现有配置)", "type": "array", "items": { "$ref": "#/definitions/model.UpdateJenkinsEnvRequest" } }, "name": { "description": "应用名称", "type": "string" }, "ops_owners": { "description": "运维负责人ID数组", "type": "array", "items": { "type": "integer" } }, "other_res": { "description": "其他资源", "allOf": [ { "$ref": "#/definitions/model.OtherResources" } ] }, "programming_lang": { "description": "技术信息", "type": "string" }, "repo_url": { "description": "仓库地址", "type": "string" }, "start_command": { "description": "启动命令", "type": "string" }, "status": { "description": "状态", "type": "integer" }, "stop_command": { "description": "停止命令", "type": "string" }, "test_owners": { "description": "测试负责人ID数组", "type": "array", "items": { "type": "integer" } } } }, "model.UpdateCmdbHostDto": { "type": "object", "required": [ "groupId", "hostName", "sshIp", "sshKeyId", "sshName" ], "properties": { "groupId": { "description": "主机分组ID", "type": "integer" }, "hostName": { "description": "主机名称(唯一标识)", "type": "string" }, "id": { "description": "主机ID", "type": "integer" }, "remark": { "description": "备注信息(可选)", "type": "string" }, "sshIp": { "description": "SSH连接IP(公网或私网IP)", "type": "string" }, "sshKeyId": { "description": "SSH凭据ID(从ecsAuth表获取)", "type": "integer" }, "sshName": { "description": "SSH登录用户名", "type": "string" }, "sshPort": { "description": "SSH端口(默认22)", "type": "integer" }, "vendor": { "description": "厂商类型:1-\u003e自建,2-\u003e阿里云,3-\u003e腾讯云", "type": "integer" } } }, "model.UpdateConfigMapRequest": { "type": "object", "properties": { "binaryData": { "description": "二进制数据", "type": "object", "additionalProperties": { "type": "array", "items": { "type": "integer", "format": "int32" } } }, "data": { "description": "数据", "type": "object", "additionalProperties": { "type": "string" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } } } }, "model.UpdateEcsAuthDto": { "type": "object", "required": [ "name", "password", "port", "type", "username" ], "properties": { "id": { "description": "ID", "type": "integer" }, "name": { "description": "凭证名称", "type": "string" }, "password": { "description": "密码", "type": "string" }, "port": { "description": "端口号", "type": "integer" }, "publicKey": { "description": "公钥", "type": "string" }, "remark": { "description": "备注", "type": "string" }, "type": { "description": "认证类型:1-\u003e密码", "type": "integer" }, "username": { "description": "用户名", "type": "string" } } }, "model.UpdateIngressRequest": { "type": "object", "properties": { "annotations": { "description": "注释", "type": "object", "additionalProperties": { "type": "string" } }, "class": { "description": "Ingress类", "type": "string" }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "rules": { "description": "路由规则", "type": "array", "items": { "$ref": "#/definitions/model.IngressRuleSpec" } }, "tls": { "description": "TLS配置", "type": "array", "items": { "$ref": "#/definitions/model.IngressTLSSpec" } } } }, "model.UpdateJenkinsEnvRequest": { "type": "object", "properties": { "env_name": { "description": "环境名称", "type": "string" }, "id": { "description": "环境配置ID(可选,不提供则创建新的)", "type": "integer" }, "jenkins_server_id": { "description": "Jenkins服务器ID(关联account_auth表)", "type": "integer" }, "job_name": { "description": "Jenkins任务名称", "type": "string" } } }, "model.UpdateKeyManageDto": { "type": "object", "required": [ "id", "keyId", "keySecret", "keyType" ], "properties": { "id": { "description": "密钥ID", "type": "integer" }, "keyId": { "description": "密钥ID", "type": "string" }, "keySecret": { "description": "密钥Secret", "type": "string" }, "keyType": { "description": "云厂商类型:1=阿里云,2=腾讯云,3=百度云,4=华为云,5=AWS云", "type": "integer" }, "remark": { "description": "备注信息", "type": "string" } } }, "model.UpdateKubeClusterRequest": { "type": "object", "properties": { "credential": { "description": "K8s凭证(kubeconfig内容)", "type": "string" }, "description": { "description": "集群描述", "type": "string" }, "name": { "description": "集群名称", "type": "string" }, "version": { "description": "集群版本(可选,同步时会自动更新)", "type": "string" } } }, "model.UpdateLimitRangeRequest": { "type": "object", "required": [ "spec" ], "properties": { "spec": { "description": "LimitRange规格", "allOf": [ { "$ref": "#/definitions/model.LimitRangeRequestSpec" } ] } } }, "model.UpdateNamespaceRequest": { "type": "object", "properties": { "annotations": { "description": "注释", "type": "object", "additionalProperties": { "type": "string" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } } } }, "model.UpdatePVCRequest": { "type": "object", "properties": { "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "resources": { "description": "资源配置", "allOf": [ { "$ref": "#/definitions/model.PVCResourcesSpec" } ] } } }, "model.UpdatePVRequest": { "type": "object", "properties": { "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "mountOptions": { "description": "挂载选项", "type": "array", "items": { "type": "string" } }, "reclaimPolicy": { "description": "回收策略", "type": "string" } } }, "model.UpdatePersonalDto": { "type": "object", "required": [ "email", "nickname", "note", "phone", "username" ], "properties": { "email": { "description": "邮箱", "type": "string" }, "icon": { "description": "头像", "type": "string" }, "id": { "description": "ID", "type": "integer" }, "nickname": { "description": "昵称", "type": "string" }, "note": { "description": "备注", "type": "string" }, "phone": { "description": "电话", "type": "string" }, "username": { "description": "用户名", "type": "string" } } }, "model.UpdatePersonalPasswordDto": { "type": "object", "required": [ "newPassword", "password", "resetPassword" ], "properties": { "id": { "description": "ID", "type": "integer" }, "newPassword": { "description": "新密码", "type": "string" }, "password": { "description": "密码", "type": "string" }, "resetPassword": { "description": "重复密码", "type": "string" } } }, "model.UpdatePodYAMLRequest": { "type": "object", "required": [ "yamlContent" ], "properties": { "dryRun": { "description": "是否只进行校验不实际更新", "type": "boolean" }, "force": { "description": "是否强制更新(删除重建)", "type": "boolean" }, "validateOnly": { "description": "是否只校验YAML格式", "type": "boolean" }, "yamlContent": { "description": "YAML内容", "type": "string" } } }, "model.UpdatePodYAMLResponse": { "type": "object", "properties": { "changes": { "description": "变更说明", "type": "array", "items": { "type": "string" } }, "message": { "description": "响应消息", "type": "string" }, "namespace": { "description": "Pod所在的命名空间", "type": "string" }, "podName": { "description": "更新的Pod名称", "type": "string" }, "success": { "description": "是否更新成功", "type": "boolean" }, "updateStrategy": { "description": "更新策略 (patch/recreate)", "type": "string" }, "validationResult": { "description": "校验结果(DryRun时返回)", "allOf": [ { "$ref": "#/definitions/model.ValidateYAMLResponse" } ] }, "warnings": { "description": "警告信息", "type": "array", "items": { "type": "string" } } } }, "model.UpdateResourceQuotaRequest": { "type": "object", "required": [ "hard" ], "properties": { "hard": { "description": "硬限制", "type": "object", "additionalProperties": { "type": "string" } }, "scopeSelector": { "description": "作用域选择器", "type": "object", "additionalProperties": true }, "scopes": { "description": "作用域", "type": "array", "items": { "type": "string" } } } }, "model.UpdateSecretRequest": { "type": "object", "properties": { "data": { "description": "数据(base64编码)", "type": "object", "additionalProperties": { "type": "array", "items": { "type": "integer", "format": "int32" } } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "stringData": { "description": "字符串数据", "type": "object", "additionalProperties": { "type": "string" } } } }, "model.UpdateServiceRequest": { "type": "object", "properties": { "externalIPs": { "description": "外部IP列表", "type": "array", "items": { "type": "string" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "ports": { "description": "端口配置", "type": "array", "items": { "$ref": "#/definitions/model.ServicePortSpec" } }, "selector": { "description": "选择器", "type": "object", "additionalProperties": { "type": "string" } }, "type": { "description": "服务类型", "type": "string" } } }, "model.UpdateStorageClassRequest": { "type": "object", "properties": { "allowVolumeExpansion": { "description": "允许卷扩展", "type": "boolean" }, "allowedTopologies": { "description": "允许的拓扑", "type": "array", "items": { "$ref": "#/definitions/model.StorageClassTopology" } }, "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "mountOptions": { "description": "挂载选项", "type": "array", "items": { "type": "string" } }, "parameters": { "description": "参数", "type": "object", "additionalProperties": { "type": "string" } } } }, "model.UpdateSyncScheduleDto": { "type": "object", "required": [ "cronExpr", "id", "keyTypes", "name" ], "properties": { "cronExpr": { "description": "cron表达式", "type": "string" }, "id": { "description": "配置ID", "type": "integer" }, "keyTypes": { "description": "要同步的云厂商类型(JSON数组格式:[1,2,3])", "type": "string" }, "name": { "description": "配置名称", "type": "string" }, "remark": { "description": "备注信息", "type": "string" }, "status": { "description": "状态:1=启用,0=禁用", "type": "integer" } } }, "model.UpdateSysAdminDto": { "type": "object", "properties": { "deptId": { "description": "部门id", "type": "integer" }, "email": { "description": "邮箱", "type": "string" }, "id": { "description": "ID", "type": "integer" }, "nickname": { "description": "昵称", "type": "string" }, "note": { "description": "备注", "type": "string" }, "phone": { "description": "手机号", "type": "string" }, "postId": { "description": "岗位id", "type": "integer" }, "roleId": { "description": "角色id", "type": "integer" }, "status": { "description": "状态:1-\u003e启用,2-\u003e禁用", "type": "integer" }, "username": { "description": "用户名", "type": "string" } } }, "model.UpdateSysAdminStatusDto": { "type": "object", "properties": { "id": { "description": "ID", "type": "integer" }, "status": { "description": "状态:1-\u003e启用,2-\u003e禁用", "type": "integer" } } }, "model.UpdateSysPostStatusDto": { "type": "object", "properties": { "id": { "description": "ID", "type": "integer" }, "postStatus": { "description": "状态(1-\u003e正常 2-\u003e停用)", "type": "integer" } } }, "model.UpdateSysRoleDto": { "type": "object", "properties": { "description": { "description": "描述", "type": "string" }, "id": { "description": "Id", "type": "integer" }, "roleKey": { "description": "角色key", "type": "string" }, "roleName": { "description": "角色名称", "type": "string" }, "status": { "description": "状态:1-\u003e启用,2-\u003e禁用", "type": "integer" } } }, "model.UpdateSysRoleStatusDto": { "type": "object", "properties": { "id": { "description": "ID", "type": "integer" }, "status": { "description": "状态:1-\u003e启用,2-\u003e禁用", "type": "integer" } } }, "model.UpdateToolDto": { "type": "object", "required": [ "id", "link", "title" ], "properties": { "icon": { "description": "导航图标", "type": "string" }, "id": { "description": "ID", "type": "integer" }, "link": { "description": "链接地址", "type": "string", "maxLength": 500 }, "sort": { "description": "排序", "type": "integer" }, "title": { "description": "导航标题", "type": "string", "maxLength": 100, "minLength": 1 } } }, "model.UpdateWorkloadRequest": { "type": "object", "properties": { "labels": { "description": "标签", "type": "object", "additionalProperties": { "type": "string" } }, "strategy": { "description": "部署策略" }, "template": { "description": "Pod模板", "allOf": [ { "$ref": "#/definitions/model.PodTemplateSpec" } ] } } }, "model.UpdateWorkloadYAMLRequest": { "type": "object", "required": [ "workloadName", "workloadType", "yamlContent" ], "properties": { "dryRun": { "description": "是否只进行校验不实际更新", "type": "boolean" }, "force": { "description": "是否强制更新", "type": "boolean" }, "validateOnly": { "description": "是否只校验YAML格式", "type": "boolean" }, "workloadName": { "description": "工作负载名称", "type": "string" }, "workloadType": { "description": "工作负载类型: deployment,statefulset,daemonset,job,cronjob", "type": "string" }, "yamlContent": { "description": "YAML内容", "type": "string" } } }, "model.UpdateWorkloadYAMLResponse": { "type": "object", "properties": { "appliedAt": { "description": "应用时间", "type": "string" }, "changes": { "description": "变更说明", "type": "array", "items": { "type": "string" } }, "message": { "description": "响应消息", "type": "string" }, "namespace": { "description": "命名空间", "type": "string" }, "success": { "description": "是否更新成功", "type": "boolean" }, "updateStrategy": { "description": "更新策略 (patch/update/rolling)", "type": "string" }, "validationResult": { "description": "校验结果(DryRun时返回)", "allOf": [ { "$ref": "#/definitions/model.ValidateYAMLResponse" } ] }, "warnings": { "description": "警告信息", "type": "array", "items": { "type": "string" } }, "workloadName": { "description": "工作负载名称", "type": "string" }, "workloadType": { "description": "工作负载类型", "type": "string" } } }, "model.User": { "type": "object", "properties": { "absoluteUrl": { "description": "绝对URL", "type": "string" }, "fullName": { "description": "全名", "type": "string" } } }, "model.ValidateJenkinsJobRequest": { "type": "object", "required": [ "jenkins_server_id", "job_name" ], "properties": { "jenkins_server_id": { "description": "Jenkins服务器ID", "type": "integer" }, "job_name": { "description": "任务名称", "type": "string" } } }, "model.ValidateJenkinsJobResponse": { "type": "object", "properties": { "exists": { "description": "任务是否存在", "type": "boolean" }, "job_name": { "description": "任务名称", "type": "string" }, "job_url": { "description": "任务URL(如果存在)", "type": "string" }, "message": { "description": "验证消息", "type": "string" }, "server_id": { "description": "服务器ID", "type": "integer" } } }, "model.ValidateYAMLRequest": { "type": "object", "required": [ "yamlContent" ], "properties": { "resourceType": { "description": "资源类型,如pod、deployment等", "type": "string" }, "yamlContent": { "description": "YAML内容", "type": "string" } } }, "model.ValidateYAMLResponse": { "type": "object", "properties": { "errors": { "description": "错误列表", "type": "array", "items": { "type": "string" } }, "parsedObject": { "description": "解析后的对象", "type": "object", "additionalProperties": true }, "suggestions": { "description": "建议列表", "type": "array", "items": { "type": "string" } }, "valid": { "description": "是否有效", "type": "boolean" }, "warnings": { "description": "警告列表", "type": "array", "items": { "type": "string" } } } }, "model.VolumeInfo": { "type": "object", "properties": { "mountPath": { "description": "挂载路径", "type": "string" }, "name": { "description": "卷名称", "type": "string" }, "readOnly": { "description": "只读状态", "type": "boolean" }, "type": { "description": "卷类型", "type": "string" } } }, "model.VolumeMount": { "type": "object", "required": [ "mountPath", "name" ], "properties": { "mountPath": { "description": "挂载路径", "type": "string" }, "name": { "description": "卷名称", "type": "string" }, "readOnly": { "description": "只读模式", "type": "boolean" } } }, "model.VolumeSpec": { "type": "object", "required": [ "name", "type" ], "properties": { "config": { "description": "卷配置", "type": "object", "additionalProperties": true }, "name": { "description": "卷名称", "type": "string" }, "type": { "description": "卷类型", "type": "string" } } }, "model.WorkloadCondition": { "type": "object", "properties": { "lastTransitionTime": { "description": "最后转换时间", "type": "string" }, "message": { "description": "消息", "type": "string" }, "reason": { "description": "原因", "type": "string" }, "status": { "description": "状态", "type": "string" }, "type": { "description": "条件类型", "type": "string" } } }, "model.WorkloadListResponse": { "type": "object", "properties": { "total": { "type": "integer" }, "workloads": { "type": "array", "items": { "$ref": "#/definitions/model.K8sWorkload" } } } }, "model.WorkloadResources": { "type": "object", "properties": { "limits": { "description": "资源限制", "allOf": [ { "$ref": "#/definitions/model.ResourceSpec" } ] }, "requests": { "description": "资源请求", "allOf": [ { "$ref": "#/definitions/model.ResourceSpec" } ] } } }, "model.WorkloadSummary": { "type": "object", "properties": { "runningPods": { "description": "运行中的Pod数", "type": "integer" }, "totalCronJobs": { "description": "CronJob总数", "type": "integer" }, "totalDaemonSets": { "description": "DaemonSet总数", "type": "integer" }, "totalDeployments": { "description": "Deployment总数", "type": "integer" }, "totalJobs": { "description": "Job总数", "type": "integer" }, "totalPods": { "description": "Pod总数", "type": "integer" }, "totalStatefulSets": { "description": "StatefulSet总数", "type": "integer" } } }, "model.WorkloadType": { "type": "string", "enum": [ "Deployment", "StatefulSet", "DaemonSet", "Job", "CronJob", "Pod" ], "x-enum-varnames": [ "WorkloadTypeDeployment", "WorkloadTypeStatefulSet", "WorkloadTypeDaemonSet", "WorkloadTypeJob", "WorkloadTypeCronJob", "WorkloadTypePod" ] }, "result.PageResult": { "type": "object", "properties": { "list": { "description": "数据列表" }, "page": { "description": "当前页码", "type": "integer" }, "pageSize": { "description": "每页数量", "type": "integer" }, "total": { "description": "总记录数", "type": "integer" } } }, "result.Result": { "type": "object", "properties": { "code": { "description": "状态码", "type": "integer" }, "data": { "description": "返回的数据" }, "message": { "description": "提示信息", "type": "string" } } }, "util.HTime": { "type": "object", "properties": { "time.Time": { "type": "string" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }