@daocloud-proto/skoala 0.19.4 → 0.20.0-4

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.
@@ -0,0 +1,178 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
8
+ import * as InsightIoApiAlertV1alpha1Type from "./type.pb"
9
+ export type ID = {
10
+ id?: string
11
+ }
12
+
13
+ export type ListGroupsRequest = {
14
+ builtin?: boolean
15
+ name?: string
16
+ clusterName?: string
17
+ namespace?: string
18
+ page?: number
19
+ pageSize?: number
20
+ sorts?: string[]
21
+ }
22
+
23
+ export type ListGroupsResponse = {
24
+ items?: GroupSummary[]
25
+ pagination?: InsightIoApiTypeV1alpha1Page.Pagination
26
+ }
27
+
28
+ export type GroupSummary = {
29
+ id?: string
30
+ name?: string
31
+ builtin?: boolean
32
+ clusterName?: string
33
+ namespace?: string
34
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
35
+ targets?: string[]
36
+ groupRuleStatus?: groupRuleStatus[]
37
+ description?: string
38
+ createAt?: string
39
+ updateAt?: string
40
+ }
41
+
42
+ export type groupRuleStatus = {
43
+ status?: InsightIoApiAlertV1alpha1Type.RuleStatus
44
+ count?: number
45
+ }
46
+
47
+ export type CreateGroupRequest = {
48
+ name?: string
49
+ description?: string
50
+ clusterName?: string
51
+ namespace?: string
52
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
53
+ targets?: string[]
54
+ rules?: CreateGroupRule[]
55
+ notificationTemplate?: string
56
+ receivers?: receiver[]
57
+ notifyRepeatConfig?: repeatConfig[]
58
+ }
59
+
60
+ export type repeatConfig = {
61
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
62
+ interval?: number
63
+ }
64
+
65
+ export type receiver = {
66
+ type?: string
67
+ names?: string[]
68
+ }
69
+
70
+ export type Group = {
71
+ id?: string
72
+ name?: string
73
+ builtin?: boolean
74
+ clusterName?: string
75
+ namespace?: string
76
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
77
+ targets?: string[]
78
+ description?: string
79
+ notificationTemplate?: string
80
+ receivers?: receiver[]
81
+ notifyRepeatConfig?: repeatConfig[]
82
+ createAt?: string
83
+ updateAt?: string
84
+ }
85
+
86
+ export type UpdateGroupRequest = {
87
+ id?: string
88
+ description?: string
89
+ notificationTemplate?: string
90
+ receivers?: receiver[]
91
+ notifyRepeatConfig?: repeatConfig[]
92
+ }
93
+
94
+ export type ListGroupRulesRequest = {
95
+ id?: string
96
+ name?: string
97
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
98
+ status?: InsightIoApiAlertV1alpha1Type.RuleStatus
99
+ page?: number
100
+ pageSize?: number
101
+ sorts?: string[]
102
+ }
103
+
104
+ export type ListRulesV2Response = {
105
+ items?: RuleV2Summary[]
106
+ pagination?: InsightIoApiTypeV1alpha1Page.Pagination
107
+ }
108
+
109
+ export type RuleV2Summary = {
110
+ id?: string
111
+ name?: string
112
+ groupId?: string
113
+ groupName?: string
114
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
115
+ source?: InsightIoApiAlertV1alpha1Type.RuleSource
116
+ expr?: string
117
+ thresholdSymbol?: string
118
+ thresholdNum?: number
119
+ status?: InsightIoApiAlertV1alpha1Type.RuleStatus
120
+ description?: string
121
+ createAt?: string
122
+ }
123
+
124
+ export type RuleV2 = {
125
+ id?: string
126
+ name?: string
127
+ groupId?: string
128
+ groupName?: string
129
+ expr?: string
130
+ thresholdSymbol?: string
131
+ thresholdNum?: number
132
+ duration?: string
133
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
134
+ source?: InsightIoApiAlertV1alpha1Type.RuleSource
135
+ status?: InsightIoApiAlertV1alpha1Type.RuleStatus
136
+ promQL?: string
137
+ labels?: {[key: string]: string}
138
+ annotations?: {[key: string]: string}
139
+ description?: string
140
+ createAt?: string
141
+ updateAt?: string
142
+ }
143
+
144
+ export type AddGroupRuleRequest = {
145
+ groupId?: string
146
+ rule?: CreateGroupRule
147
+ }
148
+
149
+ export type CreateGroupRule = {
150
+ name?: string
151
+ description?: string
152
+ source?: InsightIoApiAlertV1alpha1Type.RuleSource
153
+ expr?: string
154
+ thresholdSymbol?: string
155
+ thresholdNum?: number
156
+ duration?: string
157
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
158
+ labels?: {[key: string]: string}
159
+ annotations?: {[key: string]: string}
160
+ }
161
+
162
+ export type UpdateRuleV2Request = {
163
+ groupId?: string
164
+ name?: string
165
+ description?: string
166
+ expr?: string
167
+ thresholdSymbol?: string
168
+ thresholdNum?: number
169
+ duration?: string
170
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
171
+ labels?: {[key: string]: string}
172
+ annotations?: {[key: string]: string}
173
+ }
174
+
175
+ export type GroupRule = {
176
+ groupId?: string
177
+ name?: string
178
+ }
@@ -0,0 +1,44 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ export enum RuleSource {
8
+ RULE_SOURCE_UNSPECIFIED = "RULE_SOURCE_UNSPECIFIED",
9
+ METRIC_TPL = "METRIC_TPL",
10
+ PROMQL = "PROMQL",
11
+ LOG_TPL = "LOG_TPL",
12
+ }
13
+
14
+ export enum TargetType {
15
+ TARGET_TYPE_UNSPECIFIED = "TARGET_TYPE_UNSPECIFIED",
16
+ GLOBAL = "GLOBAL",
17
+ CLUSTER = "CLUSTER",
18
+ NAMESPACE = "NAMESPACE",
19
+ NODE = "NODE",
20
+ DEPLOYMENT = "DEPLOYMENT",
21
+ STATEFULSET = "STATEFULSET",
22
+ DAEMONSET = "DAEMONSET",
23
+ CRONJOB = "CRONJOB",
24
+ POD = "POD",
25
+ }
26
+
27
+ export enum Severity {
28
+ SEVERITY_UNSPECIFIED = "SEVERITY_UNSPECIFIED",
29
+ CRITICAL = "CRITICAL",
30
+ WARNING = "WARNING",
31
+ INFO = "INFO",
32
+ }
33
+
34
+ export enum RuleStatus {
35
+ UNSPECIFIED = "UNSPECIFIED",
36
+ FIRING = "FIRING",
37
+ ENABLED = "ENABLED",
38
+ }
39
+
40
+ export enum AlertStatus {
41
+ ALERT_STATUS_UNSPECIFIED = "ALERT_STATUS_UNSPECIFIED",
42
+ ALERT_STATUS_FIRING = "ALERT_STATUS_FIRING",
43
+ ALERT_STATUS_RESOLVED = "ALERT_STATUS_RESOLVED",
44
+ }
@@ -94,6 +94,15 @@ export enum ExternalTrafficPolicy {
94
94
  TrafficPolicyLocal = "TrafficPolicyLocal",
95
95
  }
96
96
 
97
+ export enum WorkloadState {
98
+ WORKLOAD_STATE_UNSPECIFIED = "WORKLOAD_STATE_UNSPECIFIED",
99
+ WorkloadStateRunning = "WorkloadStateRunning",
100
+ WorkloadStateDeleting = "WorkloadStateDeleting",
101
+ WorkloadStateNotReady = "WorkloadStateNotReady",
102
+ WorkloadStateStopped = "WorkloadStateStopped",
103
+ WorkloadStateWaiting = "WorkloadStateWaiting",
104
+ }
105
+
97
106
  export type Cluster = {
98
107
  id?: string
99
108
  name?: string
@@ -263,4 +263,16 @@ export type ListClusterLBAddrPoolRes = {
263
263
 
264
264
  export type ListComponentsVersionRes = {
265
265
  components?: SkoalaApiGeneralV1alpha1Common.Component[]
266
+ }
267
+
268
+ export type CheckMidModuleReq = {
269
+ workspaceId?: string
270
+ clusterName?: string
271
+ page?: number
272
+ pageSize?: number
273
+ }
274
+
275
+ export type CheckMidModuleRes = {
276
+ mysql?: boolean
277
+ redis?: boolean
266
278
  }
@@ -111,6 +111,7 @@ export type AdvancedAPIConfig = {
111
111
  authPolicy?: AuthPolicy
112
112
  cookieRewritePolicy?: CookieRewritePolicy[]
113
113
  ipPolicy?: SkoalaApiHostedV1alpha1Gateway.IPPolicy
114
+ domainIpPolicyStatus?: SkoalaApiHostedV1alpha1Gateway.IPPolicyStatus
114
115
  }
115
116
 
116
117
  export type CookieRewritePolicy = {
@@ -70,6 +70,12 @@ export enum IPSource {
70
70
  DirectRemoteIp = "DirectRemoteIp",
71
71
  }
72
72
 
73
+ export enum IPPolicyStatus {
74
+ IP_POLICY_STATUS_UNSPECIFIED = "IP_POLICY_STATUS_UNSPECIFIED",
75
+ AllowEnabled = "AllowEnabled",
76
+ DenyEnabled = "DenyEnabled",
77
+ }
78
+
73
79
  export enum GatewayConditionType {
74
80
  TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
75
81
  Scheduled = "Scheduled",
@@ -102,6 +108,7 @@ export enum ListGatewayPodContainerReqComponentType {
102
108
  export type Node = {
103
109
  total?: number
104
110
  online?: number
111
+ workloadState?: SkoalaApiGeneralV1alpha1Common.WorkloadState
105
112
  }
106
113
 
107
114
  export type GatewayCondition = {
@@ -118,7 +125,8 @@ export type Gateway = {
118
125
  createdAt?: string
119
126
  updatedAt?: string
120
127
  condition?: GatewayCondition
121
- endpoints?: string[]
128
+ externalEndpoints?: string[]
129
+ internalEndpoints?: string[]
122
130
  contour?: Node
123
131
  envoy?: Node
124
132
  apiCount?: number
@@ -519,7 +527,6 @@ export type IPPolicyRule = {
519
527
  }
520
528
 
521
529
  export type IPPolicy = {
522
- path?: string
523
530
  level?: IPPolicyLevel
524
531
  allowRules?: IPPolicyRule[]
525
532
  denyRules?: IPPolicyRule[]
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import * as GoogleProtobufAny from "../../../google/protobuf/any.pb"
8
+ import * as GoogleProtobufDuration from "../../../google/protobuf/duration.pb"
8
9
  import * as SkoalaApiGeneralV1alpha1Common from "../../general/v1alpha1/common.pb"
9
10
 
10
11
  type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
@@ -49,11 +50,18 @@ export enum ServiceStatus {
49
50
 
50
51
  export enum ServiceType {
51
52
  GOVERN_TYPE_UNSPECIFIED = "GOVERN_TYPE_UNSPECIFIED",
52
- NORMAL = "NORMAL",
53
53
  SPRING_CLOUD = "SPRING_CLOUD",
54
54
  DUBBO = "DUBBO",
55
55
  }
56
56
 
57
+ export enum LB {
58
+ UNSPECIFIED = "UNSPECIFIED",
59
+ LEAST_CONN = "LEAST_CONN",
60
+ RANDOM = "RANDOM",
61
+ PASSTHROUGH = "PASSTHROUGH",
62
+ ROUND_ROBIN = "ROUND_ROBIN",
63
+ }
64
+
57
65
 
58
66
  type BaseIstioResource = {
59
67
  type?: ResourceType
@@ -131,13 +139,20 @@ export type ListService = {
131
139
  type?: ServiceType
132
140
  port?: string
133
141
  namespace?: string
142
+ versions?: string[]
134
143
  }
135
144
 
136
145
  export type ListExportService = {
137
146
  name?: string
138
147
  namespace?: string
139
148
  status?: ServiceStatus
140
- des?: string
149
+ des?: FailedReason
150
+ }
151
+
152
+ export type FailedReason = {
153
+ serviceInfo?: string[]
154
+ instancesInfo?: string[]
155
+ workloadsInfo?: string[]
141
156
  }
142
157
 
143
158
  export type ListServiceReq = {
@@ -191,4 +206,49 @@ export type ExportServiceReq = {
191
206
  }
192
207
 
193
208
  export type ExportServiceRes = {
209
+ }
210
+
211
+ export type ListServiceGovernReq = {
212
+ workspaceId?: string
213
+ meshId?: string
214
+ namespaceName?: string
215
+ serviceName?: string
216
+ }
217
+
218
+ export type ListServiceGovernRes = {
219
+ items?: ListServiceGovern[]
220
+ }
221
+
222
+ export type ListServiceGovern = {
223
+ port?: number
224
+ lb?: LB
225
+ updateTime?: number
226
+ }
227
+
228
+ export type UpdateServiceGovernReq = {
229
+ workspaceId?: string
230
+ meshId?: string
231
+ namespaceName?: string
232
+ serviceName?: string
233
+ lb?: LB
234
+ outlierDetection?: OutlierDetection
235
+ connectionPool?: ConnectionPool
236
+ }
237
+
238
+ export type OutlierDetection = {
239
+ consecutiveErrors?: number
240
+ interval?: GoogleProtobufDuration.Duration
241
+ baseEjectionTime?: GoogleProtobufDuration.Duration
242
+ maxEjectionPercent?: number
243
+ minHealthPercent?: number
244
+ }
245
+
246
+ export type ConnectionPool = {
247
+ http1MaxPendingRequests?: number
248
+ http2MaxRequests?: number
249
+ maxRequestsPerConnection?: number
250
+ maxRetries?: number
251
+ }
252
+
253
+ export type UpdateServiceGovernRes = {
194
254
  }
@@ -95,7 +95,6 @@ export type Nacos = {
95
95
  serviceType?: SkoalaApiGeneralV1alpha1Service.ServiceType
96
96
  ports?: SkoalaApiGeneralV1alpha1Service.ServicePort[]
97
97
  status?: NacosStatus
98
- clusterPhase?: SkoalaApiGeneralV1alpha1Common.ClusterPhase
99
98
  replicas?: number
100
99
  image?: string
101
100
  version?: string
@@ -110,6 +109,8 @@ export type Nacos = {
110
109
  volume?: Volume
111
110
  createAt?: string
112
111
  insight?: SkoalaApiGeneralV1alpha1Insight.NacosInsightMetrics
112
+ clusterPhase?: SkoalaApiGeneralV1alpha1Common.ClusterPhase
113
+ workloadState?: SkoalaApiGeneralV1alpha1Common.WorkloadState
113
114
  }
114
115
 
115
116
  export type NacosDatabase = {
@@ -279,6 +280,7 @@ export type NacosServiceInstance = {
279
280
  pluginsHealthy?: NacosServiceInstancePluginsHealthy
280
281
  nacosNamespace?: string
281
282
  insight?: SkoalaApiGeneralV1alpha1Insight.InsightBrief
283
+ jvmEnabled?: boolean
282
284
  }
283
285
 
284
286
  export type GetNacosServiceReq = {
@@ -78,6 +78,7 @@ export type GetSentinelPluginRes = {
78
78
  type?: SkoalaApiGeneralV1alpha1Service.ServiceType
79
79
  ports?: SkoalaApiGeneralV1alpha1Service.ServicePort[]
80
80
  visitAddress?: string
81
+ workloadState?: SkoalaApiGeneralV1alpha1Common.WorkloadState
81
82
  }
82
83
 
83
84
  export type GetMeshPluginReq = {
@@ -49,6 +49,12 @@ export type CreateSkoalaPluginReq = BaseCreateSkoalaPluginReq
49
49
  export type UpdateUsage = {
50
50
  }
51
51
 
52
+ export type UpdateSkoalaPluginStatusReq = {
53
+ workspaceId?: string
54
+ status?: boolean
55
+ pluginName?: string
56
+ }
57
+
52
58
 
53
59
  type BaseUpdateSkoalaPluginReq = {
54
60
  workspaceId?: string
@@ -80,7 +86,8 @@ type BaseGetSkoalaPluginRes = {
80
86
  describe?: string
81
87
  usage?: PluginUsage[]
82
88
  inCluster?: boolean
83
- address?: string
89
+ address?: string[]
90
+ version?: number
84
91
  }
85
92
 
86
93
  export type GetSkoalaPluginRes = BaseGetSkoalaPluginRes
@@ -122,8 +129,10 @@ export type SkoalaPluginInfo = {
122
129
  createdAt?: string
123
130
  updatedAt?: string
124
131
  inCluster?: boolean
125
- address?: string
132
+ address?: string[]
126
133
  version?: number
134
+ disabled?: boolean
135
+ usage?: PluginUsage[]
127
136
  }
128
137
 
129
138
  export type WasmPluginConfig = {
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import * as SkoalaApiGeneralV1alpha1Common from "../../general/v1alpha1/common.pb"
8
+ import * as SkoalaApiHostedV1alpha1Gateway from "./gateway.pb"
8
9
  import * as SkoalaApiHostedV1alpha1Http from "./http.pb"
9
10
 
10
11
  type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
@@ -46,6 +47,7 @@ export type VirtualhostConfig = {
46
47
  tlsPolicy?: VirtualhostTLSPolicy
47
48
  jwtProviders?: JwtProvider[]
48
49
  authPolicy?: AuthorizationPolicy
50
+ ipPolicy?: SkoalaApiHostedV1alpha1Gateway.IPPolicy
49
51
  }
50
52
 
51
53
  export type AuthorizationPolicy = {
@@ -144,6 +146,7 @@ export type GetVirtualhostRes = {
144
146
  tlsPolicy?: VirtualhostTLSPolicy
145
147
  jwtProviders?: JwtProvider[]
146
148
  authPolicy?: AuthorizationPolicy
149
+ ipPolicy?: SkoalaApiHostedV1alpha1Gateway.IPPolicy
147
150
  }
148
151
 
149
152
  export type UpdateVirtualhostReq = {
@@ -5,37 +5,6 @@
5
5
  */
6
6
 
7
7
  import * as InsightIoApiMetricV1alpha1Metric from "../../../metric/v1alpha1/metric.pb"
8
- export type Insight = {
9
- serviceDetail?: InsightValue
10
- serviceMetrics?: InsightMetrics
11
- instanceMonitorMetrics?: MonitorMetrics
12
- }
13
-
14
- export type InstanceInsight = {
15
- instanceDetail?: InsightValue
16
- instanceMetrics?: InsightMetrics
17
- instanceMonitorMetrics?: MonitorMetrics
18
- }
19
-
20
- export type InsightValue = {
21
- call?: string
22
- successRates?: string
23
- latencies?: string
24
- }
25
-
26
- export type InsightMetrics = {
27
- p50Metrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
28
- p75Metrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
29
- p90Metrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
30
- p95Metrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
31
- p99Metrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
32
- reqRateMetric?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
33
- repLatencyMetric?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
34
- errorsRateMetrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
35
- successTotalCallsMetrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
36
- errorTotalCallsMetrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
37
- }
38
-
39
8
  export type MonitorMetrics = {
40
9
  cpuRequest?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
41
10
  cpuLimit?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
@@ -92,6 +92,9 @@ export class Skoala {
92
92
  static ListClusterLBAddrPool(req: SkoalaApiGeneralV1alpha1Skoala.ListClusterLBAddrPoolReq, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Skoala.ListClusterLBAddrPoolRes> {
93
93
  return fm.fetchReq<SkoalaApiGeneralV1alpha1Skoala.ListClusterLBAddrPoolReq, SkoalaApiGeneralV1alpha1Skoala.ListClusterLBAddrPoolRes>(`/apis/skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/lb/${req["lbType"]}/addrpools?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "lbType"])}`, {...initReq, method: "GET"})
94
94
  }
95
+ static CheckMidModule(req: SkoalaApiGeneralV1alpha1Skoala.CheckMidModuleReq, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Skoala.CheckMidModuleRes> {
96
+ return fm.fetchReq<SkoalaApiGeneralV1alpha1Skoala.CheckMidModuleReq, SkoalaApiGeneralV1alpha1Skoala.CheckMidModuleRes>(`/apis/skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/check_mid_module?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName"])}`, {...initReq, method: "GET"})
97
+ }
95
98
  }
96
99
  export class Registry {
97
100
  static List(req: SkoalaApiIntegratedV1alpha1Registry.ListRegistryReq, initReq?: fm.InitReq): Promise<SkoalaApiIntegratedV1alpha1Registry.ListRegistryRes> {
@@ -436,6 +439,12 @@ export class Mesh {
436
439
  static ExportService(req: SkoalaApiHostedV1alpha1Mesh.ExportServiceReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Mesh.ExportServiceRes> {
437
440
  return fm.fetchReq<SkoalaApiHostedV1alpha1Mesh.ExportServiceReq, SkoalaApiHostedV1alpha1Mesh.ExportServiceRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/meshes/${req["meshId"]}/services`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
438
441
  }
442
+ static ListServiceGovern(req: SkoalaApiHostedV1alpha1Mesh.ListServiceGovernReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Mesh.ListServiceGovernRes> {
443
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Mesh.ListServiceGovernReq, SkoalaApiHostedV1alpha1Mesh.ListServiceGovernRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/meshes/${req["meshId"]}/namespaces/${req["namespaceName"]}/services/${req["serviceName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "meshId", "namespaceName", "serviceName"])}`, {...initReq, method: "GET"})
444
+ }
445
+ static UpdateServiceGovern(req: SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernRes> {
446
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernReq, SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/meshes/${req["meshId"]}/namespaces/${req["namespaceName"]}/services/${req["serviceName"]}`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
447
+ }
439
448
  }
440
449
  export class Plugin {
441
450
  static List(req: SkoalaApiHostedV1alpha1Plugins.ListPluginReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Plugins.ListPluginRes> {
@@ -657,6 +666,9 @@ export class SkoalaPlugin {
657
666
  static UpdatePlugin(req: SkoalaApiHostedV1alpha1Skoala_plugins.UpdateSkoalaPluginReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
658
667
  return fm.fetchReq<SkoalaApiHostedV1alpha1Skoala_plugins.UpdateSkoalaPluginReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/plugins/${req["pluginName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
659
668
  }
669
+ static UpdatePluginStatus(req: SkoalaApiHostedV1alpha1Skoala_plugins.UpdateSkoalaPluginStatusReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
670
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Skoala_plugins.UpdateSkoalaPluginStatusReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/plugins/${req["pluginName"]}/status/${req["status"]}`, {...initReq, method: "PUT"})
671
+ }
660
672
  static ListPlugin(req: SkoalaApiHostedV1alpha1Skoala_plugins.ListSkoalaPluginReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Skoala_plugins.ListSkoalaPluginRes> {
661
673
  return fm.fetchReq<SkoalaApiHostedV1alpha1Skoala_plugins.ListSkoalaPluginReq, SkoalaApiHostedV1alpha1Skoala_plugins.ListSkoalaPluginRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/plugins?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
662
674
  }
@@ -8,6 +8,7 @@ export enum FeatureGateIDEnum {
8
8
  METRICS = "METRICS",
9
9
  LOGGING = "LOGGING",
10
10
  TRACING = "TRACING",
11
+ GRAPH_VIRTUAL_NODE = "GRAPH_VIRTUAL_NODE",
11
12
  }
12
13
 
13
14
  export type FeatureGateID = {
@@ -5,6 +5,16 @@
5
5
  */
6
6
 
7
7
  import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb"
8
+ import * as InsightIoApiSpan_metricV1alpha1Otelspankind from "../../span_metric/v1alpha1/otelspankind.pb"
9
+
10
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
11
+ type OneOf<T> =
12
+ | { [k in keyof T]?: undefined }
13
+ | (
14
+ keyof T extends infer K ?
15
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
16
+ : never)
17
+ : never);
8
18
 
9
19
  export enum NodeType {
10
20
  NODE_TYPE_UNSPECIFIED = "NODE_TYPE_UNSPECIFIED",
@@ -37,6 +47,37 @@ export enum GraphType {
37
47
  MIXED = "MIXED",
38
48
  }
39
49
 
50
+ export enum FilterField {
51
+ SERVICE_NAME = "SERVICE_NAME",
52
+ STATUS_ERROR_RATE = "STATUS_ERROR_RATE",
53
+ STATUS_LATENCY = "STATUS_LATENCY",
54
+ CUSTOM_LABEL = "CUSTOM_LABEL",
55
+ }
56
+
57
+ export enum FilterOperator {
58
+ EQ = "EQ",
59
+ NE = "NE",
60
+ LT = "LT",
61
+ LE = "LE",
62
+ GT = "GT",
63
+ GE = "GE",
64
+ CONTAIN = "CONTAIN",
65
+ NOT_CONTAIN = "NOT_CONTAIN",
66
+ EQUAL = "EQUAL",
67
+ NOT_EQUAL = "NOT_EQUAL",
68
+ REGEX_PATTERN = "REGEX_PATTERN",
69
+ }
70
+
71
+ export enum AggType {
72
+ INTERSECTION = "INTERSECTION",
73
+ UNION = "UNION",
74
+ }
75
+
76
+ export enum FilterDataType {
77
+ NODE_DATA = "NODE_DATA",
78
+ EDGE_DATA = "EDGE_DATA",
79
+ }
80
+
40
81
  export type Status = {
41
82
  name?: string
42
83
  value?: number
@@ -82,6 +123,22 @@ export type Graph = {
82
123
  graphType?: GraphType
83
124
  }
84
125
 
126
+
127
+ type BaseOperatorClause = {
128
+ dataType?: FilterDataType
129
+ field?: FilterField
130
+ operation?: FilterOperator
131
+ }
132
+
133
+ export type OperatorClause = BaseOperatorClause
134
+ & OneOf<{ stringValue: string; floatValue: number }>
135
+
136
+ export type Filter = {
137
+ clauses?: OperatorClause[]
138
+ aggType?: AggType
139
+ dependencyMaxDepth?: number
140
+ }
141
+
85
142
  export type BaseGraphQuery = {
86
143
  clusters?: string[]
87
144
  namespaces?: string[]
@@ -89,8 +146,11 @@ export type BaseGraphQuery = {
89
146
  layer?: Layer
90
147
  start?: string
91
148
  end?: string
92
- extensionFilters?: string
149
+ extensionLabels?: string
93
150
  graphType?: GraphType
151
+ clusterNames?: string[]
152
+ filters?: Filter
153
+ showVirtualNode?: boolean
94
154
  }
95
155
 
96
156
  export type BaseMetricsQuery = {
@@ -102,6 +162,8 @@ export type BaseMetricsQuery = {
102
162
  lookback?: string
103
163
  step?: string
104
164
  ratePer?: string
165
+ clusterName?: string
166
+ spanKinds?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind[]
105
167
  }
106
168
 
107
169
  export type NodeMetricResponse = {
@@ -4,6 +4,7 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ import * as InsightIoApiAlertV1alpha1Type from "../../alert/v1alpha1/type.pb"
7
8
  import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
8
9
 
9
10
  export enum CleanRuleType {
@@ -12,52 +13,13 @@ export enum CleanRuleType {
12
13
  Clean_Specific = "Clean_Specific",
13
14
  }
14
15
 
15
- export enum RuleSource {
16
- RULE_SOURCE_UNSPECIFIED = "RULE_SOURCE_UNSPECIFIED",
17
- METRIC_TPL = "METRIC_TPL",
18
- PROMQL = "PROMQL",
19
- LOG_TPL = "LOG_TPL",
20
- }
21
-
22
- export enum TargetType {
23
- TARGET_TYPE_UNSPECIFIED = "TARGET_TYPE_UNSPECIFIED",
24
- GLOBAL = "GLOBAL",
25
- CLUSTER = "CLUSTER",
26
- NAMESPACE = "NAMESPACE",
27
- NODE = "NODE",
28
- DEPLOYMENT = "DEPLOYMENT",
29
- STATEFULSET = "STATEFULSET",
30
- DAEMONSET = "DAEMONSET",
31
- CRONJOB = "CRONJOB",
32
- POD = "POD",
33
- }
34
-
35
- export enum Severity {
36
- SEVERITY_UNSPECIFIED = "SEVERITY_UNSPECIFIED",
37
- CRITICAL = "CRITICAL",
38
- WARNING = "WARNING",
39
- INFO = "INFO",
40
- }
41
-
42
- export enum RuleStatus {
43
- UNSPECIFIED = "UNSPECIFIED",
44
- FIRING = "FIRING",
45
- ENABLED = "ENABLED",
46
- }
47
-
48
- export enum AlertStatus {
49
- ALERT_STATUS_UNSPECIFIED = "ALERT_STATUS_UNSPECIFIED",
50
- ALERT_STATUS_FIRING = "ALERT_STATUS_FIRING",
51
- ALERT_STATUS_RESOLVED = "ALERT_STATUS_RESOLVED",
52
- }
53
-
54
16
  export type ListRulesRequest = {
55
17
  builtin?: boolean
56
18
  name?: string
57
19
  clusterName?: string
58
20
  namespace?: string
59
- severity?: Severity
60
- status?: RuleStatus
21
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
22
+ status?: InsightIoApiAlertV1alpha1Type.RuleStatus
61
23
  page?: number
62
24
  pageSize?: number
63
25
  sorts?: string[]
@@ -71,17 +33,17 @@ export type ListRulesResponse = {
71
33
  export type RuleSummary = {
72
34
  ruleId?: string
73
35
  ruleName?: string
74
- severity?: Severity
36
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
75
37
  clusterName?: string
76
38
  namespace?: string
77
- targetType?: TargetType
39
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
78
40
  targetNames?: string[]
79
- source?: RuleSource
41
+ source?: InsightIoApiAlertV1alpha1Type.RuleSource
80
42
  expr?: string
81
43
  thresholdSymbol?: string
82
44
  thresholdNum?: number
83
45
  duration?: number
84
- status?: RuleStatus
46
+ status?: InsightIoApiAlertV1alpha1Type.RuleStatus
85
47
  builtin?: boolean
86
48
  createAt?: string
87
49
  }
@@ -96,15 +58,15 @@ export type Rule = {
96
58
  builtin?: boolean
97
59
  clusterName?: string
98
60
  namespace?: string
99
- source?: RuleSource
100
- targetType?: TargetType
61
+ source?: InsightIoApiAlertV1alpha1Type.RuleSource
62
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
101
63
  targetNames?: string[]
102
64
  expr?: string
103
65
  thresholdSymbol?: string
104
66
  thresholdNum?: number
105
67
  duration?: number
106
- severity?: Severity
107
- status?: RuleStatus
68
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
69
+ status?: InsightIoApiAlertV1alpha1Type.RuleStatus
108
70
  labels?: {[key: string]: string}
109
71
  description?: string
110
72
  notificationTemplate?: string
@@ -128,14 +90,14 @@ export type CreateRuleRequest = {
128
90
  description?: string
129
91
  clusterName?: string
130
92
  namespace?: string
131
- source?: RuleSource
132
- targetType?: TargetType
93
+ source?: InsightIoApiAlertV1alpha1Type.RuleSource
94
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
133
95
  targetNames?: string[]
134
96
  expr?: string
135
97
  thresholdSymbol?: string
136
98
  thresholdNum?: number
137
99
  duration?: number
138
- severity?: Severity
100
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
139
101
  notificationTemplate?: string
140
102
  annotation?: Annotation
141
103
  }
@@ -147,7 +109,7 @@ export type UpdateRuleRequest = {
147
109
  thresholdSymbol?: string
148
110
  thresholdNum?: number
149
111
  duration?: number
150
- severity?: Severity
112
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
151
113
  notificationTemplate?: string
152
114
  annotation?: Annotation
153
115
  }
@@ -166,8 +128,8 @@ export type ListAlertsRequest = {
166
128
  name?: string
167
129
  clusterName?: string
168
130
  namespace?: string
169
- severity?: Severity
170
- targetType?: TargetType
131
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
132
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
171
133
  targetName?: string
172
134
  page?: number
173
135
  pageSize?: number
@@ -182,12 +144,12 @@ export type ListAlertsResponse = {
182
144
  export type AlertSummary = {
183
145
  alertId?: string
184
146
  ruleName?: string
185
- severity?: Severity
147
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
186
148
  clusterName?: string
187
149
  namespace?: string
188
- targetType?: TargetType
150
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
189
151
  targetName?: string
190
- status?: AlertStatus
152
+ status?: InsightIoApiAlertV1alpha1Type.AlertStatus
191
153
  description?: string
192
154
  startAt?: string
193
155
  updateAt?: string
@@ -201,15 +163,15 @@ export type AlertInfo = {
201
163
  ruleId?: string
202
164
  clusterName?: string
203
165
  namespace?: string
204
- targetType?: TargetType
166
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
205
167
  targetName?: string
206
- severity?: Severity
168
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
207
169
  labels?: {[key: string]: string}
208
170
  description?: string
209
171
  notifyResponse?: string
210
172
  annotation?: string
211
- source?: RuleSource
212
- status?: AlertStatus
173
+ source?: InsightIoApiAlertV1alpha1Type.RuleSource
174
+ status?: InsightIoApiAlertV1alpha1Type.AlertStatus
213
175
  startAt?: string
214
176
  updateAt?: string
215
177
  }
@@ -218,12 +180,13 @@ export type CountAlertRequest = {
218
180
  resolved?: boolean
219
181
  clusterName?: string
220
182
  namespace?: string
221
- targetType?: TargetType
183
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
222
184
  targetName?: string
223
- severity?: Severity
185
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
224
186
  start?: string
225
187
  end?: string
226
188
  step?: string
189
+ groupByType?: boolean
227
190
  }
228
191
 
229
192
  export type CountAlertResponse = {
@@ -233,7 +196,12 @@ export type CountAlertResponse = {
233
196
  export type CountAlert = {
234
197
  start?: string
235
198
  end?: string
236
- count?: {[key: string]: string}
199
+ items?: countInfo[]
200
+ }
201
+
202
+ export type countInfo = {
203
+ target?: string
204
+ sum?: {[key: string]: string}
237
205
  }
238
206
 
239
207
  export type AMHookRequest = {
@@ -0,0 +1,78 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as InsightIoApiInsightV1alpha1Alert from "./alert.pb"
8
+
9
+ export enum matchType {
10
+ MATCH_TYPE_UNSPECIFIED = "MATCH_TYPE_UNSPECIFIED",
11
+ EQUAL = "EQUAL",
12
+ NOT_EQUAL = "NOT_EQUAL",
13
+ REGEXP = "REGEXP",
14
+ }
15
+
16
+ export type SilenceName = {
17
+ name?: string
18
+ }
19
+
20
+ export type CreateSilenceRequest = {
21
+ name?: string
22
+ clusterName?: string
23
+ namespace?: string
24
+ description?: string
25
+ matches?: match[]
26
+ activeTimeInterval?: timeInterval
27
+ }
28
+
29
+ export type Silence = {
30
+ name?: string
31
+ clusterName?: string
32
+ namespace?: string
33
+ description?: string
34
+ matches?: match[]
35
+ activeTimeInterval?: timeInterval
36
+ createAt?: string
37
+ updateAt?: string
38
+ }
39
+
40
+ export type UpdateSilenceRequest = {
41
+ name?: string
42
+ description?: string
43
+ matches?: match[]
44
+ activeTimeInterval?: timeInterval
45
+ }
46
+
47
+ export type match = {
48
+ type?: matchType
49
+ key?: string
50
+ value?: string
51
+ }
52
+
53
+ export type ListSilencesRequest = {
54
+ expired?: boolean
55
+ name?: string
56
+ clusterName?: string
57
+ namespace?: string
58
+ }
59
+
60
+ export type ListSilencesResponse = {
61
+ items?: Silence[]
62
+ }
63
+
64
+ export type PreviewSilenceRequest = {
65
+ clusterName?: string
66
+ namespace?: string
67
+ matches?: match[]
68
+ }
69
+
70
+ export type PreviewSilenceResponse = {
71
+ items?: InsightIoApiInsightV1alpha1Alert.AlertSummary[]
72
+ }
73
+
74
+ export type timeInterval = {
75
+ start?: string
76
+ end?: string
77
+ weekdayRange?: number[]
78
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/skoala",
3
- "version": "0.19.4",
3
+ "version": "0.20.0-4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -7,6 +7,7 @@
7
7
  import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
8
8
  import * as InsightIoApiResourceV1alpha1Pod from "./pod.pb"
9
9
  import * as InsightIoApiResourceV1alpha1Type from "./type.pb"
10
+ import * as InsightIoApiResourceV1alpha1Workload from "./workload.pb"
10
11
 
11
12
  export enum ClusterPhase {
12
13
  CLUSTER_PHASE_UNSPECIFIED = "CLUSTER_PHASE_UNSPECIFIED",
@@ -28,6 +29,9 @@ export enum ClusterProvider {
28
29
  VMWARE_TANZU = "VMWARE_TANZU",
29
30
  AWS_EKS = "AWS_EKS",
30
31
  ALIYUN_ACK = "ALIYUN_ACK",
32
+ TENCENT_TKE = "TENCENT_TKE",
33
+ HUAWEI_CCE = "HUAWEI_CCE",
34
+ MICROSOFT_AZURE = "MICROSOFT_AZURE",
31
35
  }
32
36
 
33
37
  export enum InsightAgentStatus {
@@ -41,6 +45,20 @@ export enum Role {
41
45
  ADMIN = "ADMIN",
42
46
  }
43
47
 
48
+ export enum serverComponentName {
49
+ NAME_UNSPECIFIED = "NAME_UNSPECIFIED",
50
+ VMINSERT = "VMINSERT",
51
+ VMALERT = "VMALERT",
52
+ VMALERTMANAGER = "VMALERTMANAGER",
53
+ VMSELECT = "VMSELECT",
54
+ VMSTORAGE = "VMSTORAGE",
55
+ GRAFANA = "GRAFANA",
56
+ JAEGER_COLLECTOR = "JAEGER_COLLECTOR",
57
+ JAEGER_QUERY = "JAEGER_QUERY",
58
+ OPENTELEMETRY_COLLECTOR = "OPENTELEMETRY_COLLECTOR",
59
+ ELASTICSEARCH = "ELASTICSEARCH",
60
+ }
61
+
44
62
  export type ListClustersResponse = {
45
63
  items?: Cluster[]
46
64
  }
@@ -127,4 +145,21 @@ export type AgentSummary = {
127
145
 
128
146
  export type agentModuleStatus = {
129
147
  pods?: InsightIoApiResourceV1alpha1Pod.Pod[]
148
+ }
149
+
150
+ export type ServerComponentSummary = {
151
+ summary?: serverComponent[]
152
+ }
153
+
154
+ export type serverComponent = {
155
+ name?: serverComponentName
156
+ workloadName?: string
157
+ workloadNamespace?: string
158
+ workloadKind?: InsightIoApiResourceV1alpha1Workload.WorkloadKind
159
+ phase?: InsightIoApiResourceV1alpha1Workload.WorkloadPhase
160
+ availability?: boolean
161
+ message?: string
162
+ version?: string
163
+ podNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
164
+ creationTimestamp?: string
130
165
  }
@@ -16,6 +16,12 @@ export enum PodPhase {
16
16
  POD_PHASE_FAILED = "POD_PHASE_FAILED",
17
17
  }
18
18
 
19
+ export enum JVMType {
20
+ JMX = "JMX",
21
+ OTEL = "OTEL",
22
+ NONE = "NONE",
23
+ }
24
+
19
25
  export enum ContainerPhase {
20
26
  CONTAINER_PHASE_UNSPECIFIED = "CONTAINER_PHASE_UNSPECIFIED",
21
27
  CONTAINER_PHASE_WAITING = "CONTAINER_PHASE_WAITING",
@@ -51,6 +57,15 @@ export type GetPodRequest = {
51
57
  name?: string
52
58
  }
53
59
 
60
+ export type PodJVMRequest = {
61
+ clusterName?: string
62
+ namespace?: string
63
+ name?: string
64
+ start?: string
65
+ end?: string
66
+ step?: number
67
+ }
68
+
54
69
  export type Pod = {
55
70
  name?: string
56
71
  cluster?: string
@@ -63,6 +78,16 @@ export type Pod = {
63
78
  conditions?: InsightIoApiResourceV1alpha1Type.Condition[]
64
79
  }
65
80
 
81
+ export type PodJVMInfo = {
82
+ type?: JVMType
83
+ urls?: JVMUrls
84
+ }
85
+
86
+ export type JVMUrls = {
87
+ en?: string
88
+ zh?: string
89
+ }
90
+
66
91
  export type ListContainersRequest = {
67
92
  cluster?: string
68
93
  namespace?: string
@@ -19,6 +19,11 @@ export enum SpanRefType {
19
19
  FOLLOWS_FROM = "FOLLOWS_FROM",
20
20
  }
21
21
 
22
+ export enum TraceTraceStatus {
23
+ UNHEALTHY = "UNHEALTHY",
24
+ HEALTHY = "HEALTHY",
25
+ }
26
+
22
27
  export type KeyValue = {
23
28
  key?: string
24
29
  vType?: ValueType
@@ -71,6 +76,7 @@ export type Trace = {
71
76
  processMap?: TraceProcessMapping[]
72
77
  warnings?: string[]
73
78
  traceId?: string
79
+ status?: TraceTraceStatus
74
80
  }
75
81
 
76
82
  export type Batch = {
@@ -32,14 +32,8 @@ export type BatchQueryBaseRequest = {
32
32
  serviceName?: string[]
33
33
  }
34
34
 
35
- export type Operation = {
36
- operation?: string
37
- spanKind?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind
38
- callsTotal?: number
39
- }
40
-
41
35
  export type OperationsQueryResponse = {
42
- operations?: Operation[]
36
+ operations?: string[]
43
37
  }
44
38
 
45
39