查看深度巡检任务详情
请求信息
请求行
GET /apis/testing.alauda.io/v1alpha1/namespaces/{namespace}/functiontests/{name}
读取指定的深度巡检任务。
请求行参数
名称 | 类型 | 是否必填项 | 描述 |
---|---|---|---|
name | string | 是 | 深度巡检任务的名称。 |
namespace | string | 是 | 命名空间。对象名称和身份验证范围,例如团队和项目。 |
请求参数
名称 | 类型 | 是否必填项 | 描述 |
---|---|---|---|
resourceVersion | string | 否 | 如果未设置,则基于 quorum-read 标志从远程存储返回结果;如果它是 0,那么我们只是返回我们目前在缓存,没有保证;如果设置为非零,那么结果至少与给定的 resourceVersion 一样为最新的值。 |
pretty | string | 否 | 如果为 true,则会将返回结果输出成适合打印的格式。 |
返回信息
Content-Type
application/json
,
application/yaml
状态码: 200
OK
返回体示例
深度巡检任务是 functiontests API 的结构。
{
"apiVersion": "testing.alauda.io/v1alpha1",
"kind": "FunctionTest",
"metadata": {
"annotations": {
"cpaas.io/display-name": "check example"
},
"creationTimestamp": "2021-06-08T10:02:11Z",
"generation": 8,
"name": "check-example",
"namespace": "cpaas-system",
"resourceVersion": "48604602",
"selfLink": "/apis/testing.alauda.io/v1alpha1/namespaces/cpaas-system/functiontests/check-example",
"uid": "e6bc4a4f-c050-451d-9375-1a3de04c6f58"
},
"spec": {
"environment": {
"businessCluster": "global"
},
"failedJobHistoryLimit": 2,
"functions": [
"*"
],
"schedule": "1 * * * *",
"successfulJobHistoryLimit": 1,
"suspend": false,
"type": "check"
},
"status": {
"estimatedCpu": 300,
"estimatedMemory": 300,
"estimatedTime": 71,
"lastScheduleResult": "failed",
"lastScheduleTime": "2021-06-16T09:00:23Z"
}
}
返回体说明
名称 | 类型 | 描述 |
---|---|---|
apiVersion | string | 查看公共参数 |
kind | string | 查看公共参数 |
metadata | object | 查看公共参数 |
spec | object |
FunctionTestSpec 定义了深度巡检的期望状态。
字段路径:spec |
spec.environment | object |
检测对象的环境。
字段路径:spec.environment |
environment.businessCluster | string |
目标企业集群的名称。
字段路径:spec.environment.businessCluster |
spec.failedJobHistoryLimit | integer (int32) |
保留的未完成的定时任务个数。默认为 1。
字段路径:spec.failedJobHistoryLimit |
spec.functions | array |
指定的计划测试的功能。
字段路径:spec.functions |
spec.functions[] | string |
字段路径:spec.functions[] |
spec.schedule | string |
定时任务格式中的调度安排。参见 https://en.wikipedia.org/wiki/Cron
字段路径:spec.schedule |
spec.successfulJobHistoryLimit | integer (int32) |
保留的成功完成的任务记录的个数。默认为 3。
字段路径:spec.successfulJobHistoryLimit |
spec.suspend | boolean |
此标志用于通知控制器挂起后续执行记录,不适用于已经准备好开始的执行记录。默认为 false。
字段路径:spec.suspend |
spec.type | string |
指定巡检项的类型,check 或 test。
字段路径:spec.type |
status | object |
FunctionTestStatus 定义了深度巡检任务被观察到的状态。
字段路径:status |
status.estimatedCpu | integer (int64) |
巡检任务运行时占用的 cpu 时间,单位是 m。
字段路径:status.estimatedCpu |
status.estimatedMemory | integer (int64) |
巡检任务运行时占用的存储空间,单位是 Mi。
字段路径:status.estimatedMemory |
status.estimatedTime | integer (int64) |
巡检任务预估运行时间。
字段路径:status.estimatedTime |
status.lastScheduleResult | string |
定时任务最后一次调度的结果信息。
字段路径:status.lastScheduleResult |
status.lastScheduleTime | string (date-time) |
定时任务最后一次调度成功的时间。
字段路径:status.lastScheduleTime |