Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
034db10
Merge pull request #8631 from elizabevil/v3.13.x-dep-mongo-driver
elizabevil Apr 28, 2026
2f66214
fix:修复通过日期字段查询模型实例 --bug=148529573 【CMDB】模型通过日期字段查询报错 (#8642)
elizabevil Apr 28, 2026
fb638a1
字段组合模板移除绑定的模型后鉴权与集群模板编辑“组织”字段问题修复 (#8648)
yangyy May 8, 2026
d13338d
fix: 集群/模块节点信息编辑修改时空值与新建时候不匹配 (#8637)
zc422 May 8, 2026
6aa96d1
chore: 升级依赖处理安全问题 --story=134170253 (#8651)
yangyy May 12, 2026
f63e170
fix: upgrade some dependency version (#8649)
wcy00000000000000 May 13, 2026
366476d
feat: add biz id index to pod table (#8650)
wcy00000000000000 May 13, 2026
979e14f
Merge branch 'v3.13.x' of http://github.com/TencentBlueKing/bk-cmdb i…
wcy00000000000000 May 13, 2026
2798185
Merge pull request #8652 from wcy00000000000000/v3.14.x
wcy00000000000000 May 13, 2026
4905ab4
feat: xss防护补丁 (#8654)
yangyy May 18, 2026
c280dc3
fix: del archive data format error (#8655)
wcy00000000000000 May 19, 2026
2544158
feat: add list_kube_container_in_biz_set api (#8653)
wcy00000000000000 May 19, 2026
23c6169
Merge branch 'v3.13.x' into 'v3.14.x'
wcy00000000000000 May 19, 2026
30bbfd2
docs: add v3.14.8-alpha1 version log
wcy00000000000000 May 19, 2026
aafb390
Merge pull request #8656 from wcy00000000000000/v3.14.x
wcy00000000000000 May 19, 2026
a8acb14
回滚apigw文档为swagger格式并修复导入模型bool解析错误的问题 (#8657)
wcy00000000000000 May 20, 2026
d6b5e41
docs: add v3.14.8-alpha2 version log (#8658)
wcy00000000000000 May 21, 2026
e0ba3c8
docs: add v3.14.8 version log (#8659)
wcy00000000000000 May 21, 2026
d7c0743
fix: check dangerous mongodb operators (#8660)
wcy00000000000000 May 21, 2026
112f64d
docs: add v3.14.8-beta1 version log (#8661)
wcy00000000000000 May 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 36 additions & 5 deletions docs/apidoc/apigw/backend/bk_apigw_resources_bk-cmdb.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
openapi: 3.0.1
swagger: '2.0'
basePath: /
info:
version: '0.1'
title: API Gateway Resources
description: ""
version: "0.1"
servers:
- url: /
description: ''
schemes:
- http
paths:
/api/v3/set/{biz_id}/batch:
post:
Expand Down Expand Up @@ -8625,3 +8626,33 @@ paths:
userVerifiedRequired: false
disabledStages: []
descriptionEn:
/api/v3/findmany/biz_set/{bk_biz_set_id}/kube/containers:
post:
operationId: list_kube_container_in_biz_set
description: 查询业务集下容器信息(该接口为bk-ops专用接口,可能会随时调整,其它服务请勿使用)
responses:
default:
description: ''
x-bk-apigateway-resource:
isPublic: false
allowApplyPermission: false
matchSubpath: false
backend:
type: HTTP
method: post
path: /api/v3/findmany/biz_set/{bk_biz_set_id}/kube/containers
matchSubpath: false
timeout: 0
upstreams: {}
transformHeaders: {}
pluginConfigs:
- type: bk-rate-limit
yaml: |
rates:
__default:
- period: 1
tokens: 100
authConfig:
userVerifiedRequired: false
disabledStages: []
descriptionEn: List kube container in business set
129 changes: 129 additions & 0 deletions docs/apidoc/apigw/backend/en/list_kube_container_in_biz_set.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
### Description

Query container information under a business set (version: v3.14.8+, permission: biz set access, this interface is
dedicated to bk-ops and may be adjusted at any time. Please do not use it for other services)

### Parameters

| Name | Type | Required | Description |
|------------------|--------------|----------|--------------------------------|
| bk_biz_set_id | int64 | Yes | Business set ID |
| bk_container_ids | int64 array | Yes | Container ID list, maximum 500 |
| container_fields | string array | Yes | Container attribute list |
| pod_fields | string array | Yes | Pod attribute list |
| host_fields | string array | Yes | Host attribute list |

### Request Example

```json
{
"bk_biz_set_id": 1,
"bk_container_ids": [
1,
2
],
"container_fields": [
"id",
"name",
"container_uid"
],
"pod_fields": [
"id",
"name"
],
"host_fields": [
"bk_host_id",
"bk_agent_id",
"bk_cloud_id"
]
}
```

### Response Example

```json
{
"result": true,
"code": 0,
"message": "success",
"permission": null,
"data": [
{
"container": {
"id": 1,
"name": "container1",
"container_uid": "uid"
},
"pod": {
"id": 1,
"name": "pod1"
},
"host": {
"bk_host_id": 1,
"bk_agent_id": "xxxxxxxxxxx",
"bk_cloud_id": 0
}
}
]
}
```

### Response Parameters

| Name | Type | Description |
|------------|--------|--------------------------------------------------------------------|
| result | bool | Whether the request is successful. true: successful; false: failed |
| code | int | Error code. 0 indicates success, >0 indicates failure |
| message | string | Error message returned in case of failure |
| permission | object | Permission information |

#### data[x]

| Name | Type | Description |
|-----------|--------|----------------|
| container | object | Container data |
| pod | object | Pod data |
| host | object | Host data |

#### data[x].container

| Name | Type | Description |
|---------------|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| id | int | Unique ID in cmdb |
| name | string | Container name |
| container_uid | string | Container uid |
| image | string | Container image |
| ports | object array | Container ports, format: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#containerport-v1-core |
| args | string array | Startup arguments |
| started | timestamp | Start time |
| limits | object | Resource limits, docs: https://kubernetes.io/docs/concepts/policy/resource-quotas/ |
| requests | object | Resource requests, docs: https://kubernetes.io/docs/concepts/policy/resource-quotas/ |
| liveness | object | Liveness probe, docs: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/, format: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#probe-v1-core |
| environment | object array | Environment variables, docs: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/, format: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#envvar-v1-core |
| mounts | object array | Volume mounts, docs: https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/, format: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volumemount-v1-core |

#### data[x].pod

| Name | Type | Description |
|----------------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| id | int | Unique ID in cmdb |
| name | string | Name |
| priority | int | Priority |
| labels | string map | Labels, both key and value are strings, docs: http://kubernetes.io/docs/user-guide/labels |
| ip | string | Container network IP |
| ips | object array | Container network IP array, format: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#podip-v1-core |
| volumes | object array | Volume information used, docs: https://kubernetes.io/docs/concepts/storage/volumes/, format: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volume-v1-core |
| qos_class | enum | Quality of Service, docs: https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/ |
| node_selectors | string map | Node label selector, both key and value are strings, docs: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ |
| tolerations | object array | Tolerations, format: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#toleration-v1-core |
| operator | string array | Pod operator |
| containers | object array | Container data |

#### data[x].host

| Name | Type | Description |
|--------------|----------------|-------------------------------------------------------|
| bk_host_id | int | Host ID |
| bk_agent_id | string | Agent ID |
| bk_cloud_id | int | Cloud area ID |
| other fields | attribute type | other user-defined fields, defined by model attribute |
129 changes: 129 additions & 0 deletions docs/apidoc/apigw/backend/zh/list_kube_container_in_biz_set.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
### 描述

查询业务集下容器信息 (版本:v3.14.8+,权限:业务集访问,该接口为bk-ops专用接口,可能会随时调整,其它服务请勿使用)

### 输入参数

| 字段 | 类型 | 必选 | 描述 |
|------------------|-------|----|--------------------------------------|
| bk_biz_set_id | int | 是 | 业务集ID |
| bk_container_ids | array | 是 | 容器ID列表,最多500条 |
| container_fields | array | 是 | container属性列表,控制返回结果的container里有哪些字段 |
| pod_fields | array | 是 | pod属性列表,控制返回结果的pod里有哪些字段 |
| host_fields | array | 是 | host属性列表,控制返回结果的host里有哪些字段 |

### 调用示例

```json
{
"bk_biz_set_id": 1,
"bk_container_ids": [
1,
2
],
"container_fields": [
"id",
"name",
"container_uid"
],
"pod_fields": [
"id",
"name"
],
"host_fields": [
"bk_host_id",
"bk_agent_id",
"bk_cloud_id"
]
}
```

### 响应示例

```json
{
"result": true,
"code": 0,
"message": "success",
"permission": null,
"data": [
{
"container": {
"id": 1,
"name": "container1",
"container_uid": "uid"
},
"pod": {
"id": 1,
"name": "pod1"
},
"host": {
"bk_host_id": 1,
"bk_agent_id": "xxxxxxxxxxx",
"bk_cloud_id": 0
}
}
]
}
```

### 响应参数说明

| 参数名称 | 参数类型 | 描述 |
|------------|--------------|----------------------------|
| result | bool | 请求成功与否。true:请求成功;false请求失败 |
| code | int | 错误编码。 0表示success,>0表示失败错误 |
| message | string | 请求失败返回的错误信息 |
| permission | object | 权限信息 |
| data | object array | 请求返回的数据 |

#### data[x]

| 参数名称 | 参数类型 | 描述 |
|-----------|--------|-------------|
| container | object | container数据 |
| pod | object | pod数据 |
| host | object | host数据 |

#### data[x].container

| 参数名称 | 参数类型 | 描述 |
|---------------|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| id | int | 在cmdb中的唯一ID |
| name | string | 名称 |
| container_uid | string | 容器uid |
| image | string | 镜像信息 |
| ports | object array | 容器端口,格式:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#containerport-v1-core |
| args | string array | 启动参数 |
| started | timestamp | 启动时间 |
| limits | object | 资源限制,官方文档:https://kubernetes.io/zh/docs/concepts/policy/resource-quotas/ |
| requests | object | 申请资源大小,官方文档:https://kubernetes.io/zh/docs/concepts/policy/resource-quotas/ |
| liveness | object | 存活探针,官方文档:https://kubernetes.io/zh/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ ,格式:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#probe-v1-core |
| environment | object array | 环境变量,官方文档:https://kubernetes.io/zh/docs/tasks/inject-data-application/define-environment-variable-container/ ,格式:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#envvar-v1-core |
| mounts | object array | 挂载卷,官方文档:https://kubernetes.io/zh/docs/tasks/configure-pod-container/configure-volume-storage/ ,格式:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volumemount-v1-core |

#### data[x].pod

| 参数名称 | 参数类型 | 描述 |
|----------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| id | int | 在cmdb中的唯一ID |
| name | string | 名称 |
| priority | int | 优先级 |
| labels | string map | 标签,key和value均是string,官方文档:http://kubernetes.io/docs/user-guide/labels |
| ip | string | 容器网络IP |
| ips | object array | 容器网络IP数组,格式:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#podip-v1-core |
| volumes | object array | 使用的卷信息,官方文档:https://kubernetes.io/zh/docs/concepts/storage/volumes/ ,格式:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volume-v1-core |
| qos_class | enum | 服务质量,官方文档:https://kubernetes.io/zh-cn/docs/tasks/configure-pod-container/quality-service-pod/ |
| node_selectors | string map | 节点标签选择器,key和value均是string,官方文档:https://kubernetes.io/zh/docs/concepts/scheduling-eviction/assign-pod-node/ |
| tolerations | object array | 容忍度,格式:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#toleration-v1-core |
| operator | string array | pod负责人 |
| containers | object array | 容器数据 |

#### data[x].host

| 参数名称 | 参数类型 | 描述 |
|-------------|--------|---------------------|
| bk_host_id | int | 主机ID |
| bk_agent_id | string | Agent ID |
| bk_cloud_id | int | 云区域ID |
| 其他属性字段 | 对应属性类型 | 其他自定义属性字段,与模型属性定义对应 |
Loading
Loading