@daocloud-proto/insight 0.21.1 → 0.22.0-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,6 +8,22 @@ import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.
|
|
|
8
8
|
import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
|
|
9
9
|
import * as InsightIoApiAlertV1alpha1Notify from "./notify.pb"
|
|
10
10
|
import * as InsightIoApiAlertV1alpha1Type from "./type.pb"
|
|
11
|
+
|
|
12
|
+
export enum ValidateGroupCode {
|
|
13
|
+
ERR_CODE_UNSPECIFIED = "ERR_CODE_UNSPECIFIED",
|
|
14
|
+
ERR_YAML_UNMARSHAL = "ERR_YAML_UNMARSHAL",
|
|
15
|
+
ERR_GROUP_NAME = "ERR_GROUP_NAME",
|
|
16
|
+
ERR_GROUP_RULES = "ERR_GROUP_RULES",
|
|
17
|
+
ERR_RULE = "ERR_RULE",
|
|
18
|
+
ERR_RULE_ALERT = "ERR_RULE_ALERT",
|
|
19
|
+
ERR_RULE_RECORD = "ERR_RULE_RECORD",
|
|
20
|
+
ERR_RULE_FOR = "ERR_RULE_FOR",
|
|
21
|
+
ERR_RULE_EXPR = "ERR_RULE_EXPR",
|
|
22
|
+
ERR_RULE_SEVERITY = "ERR_RULE_SEVERITY",
|
|
23
|
+
ERR_RULE_ANNOTATIONS = "ERR_RULE_ANNOTATIONS",
|
|
24
|
+
ERR_RULE_LABELS = "ERR_RULE_LABELS",
|
|
25
|
+
}
|
|
26
|
+
|
|
11
27
|
export type ID = {
|
|
12
28
|
id?: string
|
|
13
29
|
}
|
|
@@ -91,9 +107,14 @@ export type ValidateGroupRequest = {
|
|
|
91
107
|
namespace?: string
|
|
92
108
|
}
|
|
93
109
|
|
|
110
|
+
export type ValidateGroupError = {
|
|
111
|
+
code?: ValidateGroupCode
|
|
112
|
+
message?: string
|
|
113
|
+
}
|
|
114
|
+
|
|
94
115
|
export type ValidateGroupResponse = {
|
|
95
116
|
valid?: boolean
|
|
96
|
-
|
|
117
|
+
errors?: ValidateGroupError[]
|
|
97
118
|
params?: CreateGroupRequest
|
|
98
119
|
}
|
|
99
120
|
|
|
@@ -418,7 +418,7 @@ export class Probe {
|
|
|
418
418
|
return fm.fetchReq<InsightIoApiProbesV1alpha1Probe.ListProbesRequest, InsightIoApiProbesV1alpha1Probe.ListProbesResponse>(`/apis/insight.io/v1alpha1/clusters/${req["clusterName"]}/namespaces/${req["namespace"]}/probes?${fm.renderURLSearchParams(req, ["clusterName", "namespace"])}`, {...initReq, method: "GET"})
|
|
419
419
|
}
|
|
420
420
|
static AddProbe(req: InsightIoApiProbesV1alpha1Probe.CreateProbeRequest, initReq?: fm.InitReq): Promise<InsightIoApiProbesV1alpha1Probe.Probe> {
|
|
421
|
-
return fm.fetchReq<InsightIoApiProbesV1alpha1Probe.CreateProbeRequest, InsightIoApiProbesV1alpha1Probe.Probe>(`/apis/insight.io/v1alpha1/clusters/${req["clusterName"]}/namespaces/${req["namespace"]}/probes
|
|
421
|
+
return fm.fetchReq<InsightIoApiProbesV1alpha1Probe.CreateProbeRequest, InsightIoApiProbesV1alpha1Probe.Probe>(`/apis/insight.io/v1alpha1/clusters/${req["clusterName"]}/namespaces/${req["namespace"]}/probes`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
422
422
|
}
|
|
423
423
|
static GetProbe(req: InsightIoApiProbesV1alpha1Probe.BaseProbeRequest, initReq?: fm.InitReq): Promise<InsightIoApiProbesV1alpha1Probe.Probe> {
|
|
424
424
|
return fm.fetchReq<InsightIoApiProbesV1alpha1Probe.BaseProbeRequest, InsightIoApiProbesV1alpha1Probe.Probe>(`/apis/insight.io/v1alpha1/clusters/${req["clusterName"]}/namespaces/${req["namespace"]}/probes/${req["jobName"]}?${fm.renderURLSearchParams(req, ["clusterName", "namespace", "jobName"])}`, {...initReq, method: "GET"})
|
|
@@ -6,11 +6,32 @@
|
|
|
6
6
|
|
|
7
7
|
import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb"
|
|
8
8
|
|
|
9
|
+
export enum GetResourcesCountRequestResourcesFilter {
|
|
10
|
+
RESOURCE_TYPE_UNSPECIFIED = "RESOURCE_TYPE_UNSPECIFIED",
|
|
11
|
+
CLUSTER_NORMAL_TOTAL = "CLUSTER_NORMAL_TOTAL",
|
|
12
|
+
CLUSTER_TOTAL = "CLUSTER_TOTAL",
|
|
13
|
+
NODE_NORMAL_TOTAL = "NODE_NORMAL_TOTAL",
|
|
14
|
+
NODE_TOTAL = "NODE_TOTAL",
|
|
15
|
+
DEPLOYMENT_NORMAL_TOTAL = "DEPLOYMENT_NORMAL_TOTAL",
|
|
16
|
+
DEPLOYMENT_TOTAL = "DEPLOYMENT_TOTAL",
|
|
17
|
+
STATEFULSET_NORMAL_TOTAL = "STATEFULSET_NORMAL_TOTAL",
|
|
18
|
+
STATEFULSET_TOTAL = "STATEFULSET_TOTAL",
|
|
19
|
+
DAEMONSET_NORMAL_TOTAL = "DAEMONSET_NORMAL_TOTAL",
|
|
20
|
+
DAEMONSET_TOTAL = "DAEMONSET_TOTAL",
|
|
21
|
+
JOB_NORMAL_TOTAL = "JOB_NORMAL_TOTAL",
|
|
22
|
+
JOB_TOTAL = "JOB_TOTAL",
|
|
23
|
+
POD_NORMAL_TOTAL = "POD_NORMAL_TOTAL",
|
|
24
|
+
POD_TOTAL = "POD_TOTAL",
|
|
25
|
+
LOG_TOTAL = "LOG_TOTAL",
|
|
26
|
+
TRACE_TOTAL = "TRACE_TOTAL",
|
|
27
|
+
}
|
|
28
|
+
|
|
9
29
|
export enum GetResourcesRangeRequestResourceFilter {
|
|
10
30
|
RESOURCE_TYPE_UNSPECIFIED = "RESOURCE_TYPE_UNSPECIFIED",
|
|
11
31
|
NODE_TOTAL = "NODE_TOTAL",
|
|
12
|
-
|
|
13
|
-
|
|
32
|
+
POD_TOTAL = "POD_TOTAL",
|
|
33
|
+
POD_ABNORMAL_TOTAL = "POD_ABNORMAL_TOTAL",
|
|
34
|
+
POD_NORMAL_TOTAL = "POD_NORMAL_TOTAL",
|
|
14
35
|
}
|
|
15
36
|
|
|
16
37
|
export enum GetResourcesUsageRequestResourceFilters {
|
|
@@ -31,6 +52,7 @@ export enum GetServicesMonitorRequestMonitorFilter {
|
|
|
31
52
|
|
|
32
53
|
export type GetResourcesCountRequest = {
|
|
33
54
|
time?: string
|
|
55
|
+
filters?: GetResourcesCountRequestResourcesFilter[]
|
|
34
56
|
}
|
|
35
57
|
|
|
36
58
|
export type GetResourcesCountResponse = {
|
package/package.json
CHANGED