@daocloud-proto/mcamel-mysql 0.5.0-9 → 0.5.0-900

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,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 GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
8
+ import * as CommonCommon from "./common.pb"
9
+ import * as fm from "./fetch.pb"
10
+
11
+ export enum CreateCloudShellRequestType {
12
+ TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
13
+ bash = "bash",
14
+ exec = "exec",
15
+ logs = "logs",
16
+ upload = "upload",
17
+ download = "download",
18
+ }
19
+
20
+ export type ObjectMeta = {
21
+ name?: string
22
+ namespace?: string
23
+ uid?: string
24
+ resourceVersion?: string
25
+ creationTimestamp?: string
26
+ deletionTimestamp?: string
27
+ labels?: {[key: string]: string}
28
+ annotations?: {[key: string]: string}
29
+ ownerReferences?: CommonCommon.OwnerReference[]
30
+ cluster?: string
31
+ workspaceAlias?: string
32
+ }
33
+
34
+ export type CloudShell = {
35
+ metadata?: ObjectMeta
36
+ spec?: CloudShellSpec
37
+ status?: CloudShellStatus
38
+ }
39
+
40
+ export type CloudShellSpec = {
41
+ configMapName?: string
42
+ once?: boolean
43
+ commandAction?: string
44
+ ttl?: number
45
+ cleanup?: boolean
46
+ }
47
+
48
+ export type CloudShellStatus = {
49
+ phase?: string
50
+ accessUrl?: string
51
+ }
52
+
53
+ export type CreateCloudShellRequest = {
54
+ type?: CreateCloudShellRequestType
55
+ cluster?: string
56
+ namespace?: string
57
+ podName?: string
58
+ filePath?: string
59
+ container?: string
60
+ logCount?: number
61
+ data?: CloudShell
62
+ }
63
+
64
+ export type GetorDeleteCloudShellRequest = {
65
+ name?: string
66
+ }
67
+
68
+ export class CloudShellService {
69
+ static CreateCloudShell(req: CreateCloudShellRequest, initReq?: fm.InitReq): Promise<CloudShell> {
70
+ return fm.fetchReq<CreateCloudShellRequest, CloudShell>(`/apis/mcamel.io/mysql/v1alpha2/cloudshells`, {...initReq, method: "POST", body: JSON.stringify(req)})
71
+ }
72
+ static GetCloudShell(req: GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<CloudShell> {
73
+ return fm.fetchReq<GetorDeleteCloudShellRequest, CloudShell>(`/apis/mcamel.io/mysql/v1alpha2/cloudshells/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
74
+ }
75
+ static DeleteCloudShell(req: GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
76
+ return fm.fetchReq<GetorDeleteCloudShellRequest, GoogleProtobufEmpty.Empty>(`/apis/mcamel.io/mysql/v1alpha2/cloudshells/${req["name"]}`, {...initReq, method: "DELETE"})
77
+ }
78
+ }
package/cluster.pb.ts CHANGED
@@ -7,12 +7,49 @@
7
7
  import * as CommonCommon from "./common.pb"
8
8
  import * as fm from "./fetch.pb"
9
9
 
10
+ export enum PermissionsType {
11
+ None = "None",
12
+ GetInstance = "GetInstance",
13
+ CreateInstance = "CreateInstance",
14
+ UpdateInstance = "UpdateInstance",
15
+ DeleteInstance = "DeleteInstance",
16
+ GetMetric = "GetMetric",
17
+ GetInstanceLog = "GetInstanceLog",
18
+ GetConfig = "GetConfig",
19
+ UpdateConfig = "UpdateConfig",
20
+ GetBackup = "GetBackup",
21
+ CreateBackup = "CreateBackup",
22
+ UpdateBackup = "UpdateBackup",
23
+ DeleteBackup = "DeleteBackup",
24
+ GetBackupConf = "GetBackupConf",
25
+ CreateBackupConf = "CreateBackupConf",
26
+ UpdateBackupConf = "UpdateBackupConf",
27
+ DeleteBackupConf = "DeleteBackupConf",
28
+ GetTemplate = "GetTemplate",
29
+ CreateTemplate = "CreateTemplate",
30
+ UpdateTemplate = "UpdateTemplate",
31
+ DeleteTemplate = "DeleteTemplate",
32
+ GetUserPassword = "GetUserPassword",
33
+ ExportTemplate = "ExportTemplate",
34
+ ImportTemplate = "ImportTemplate",
35
+ }
36
+
10
37
  export enum EventType {
11
38
  EVENT_TYPE_UNSPECIFIED = "EVENT_TYPE_UNSPECIFIED",
12
39
  Normal = "Normal",
13
40
  Warning = "Warning",
14
41
  }
15
42
 
43
+ export enum InstallFileReqGVR {
44
+ None = "None",
45
+ CustomResourceDefinition = "CustomResourceDefinition",
46
+ }
47
+
48
+ export enum GetAllEventListReqSortDir {
49
+ ASC = "ASC",
50
+ DESC = "DESC",
51
+ }
52
+
16
53
  export enum GetEventListReqKind {
17
54
  KIND_UNSPECIFIED = "KIND_UNSPECIFIED",
18
55
  Pod = "Pod",
@@ -23,11 +60,157 @@ export enum GetWorkspaceListReqSortDir {
23
60
  DESC = "DESC",
24
61
  }
25
62
 
63
+ export enum ClusterItemNetworkMode {
64
+ Unknown = "Unknown",
65
+ Flannel = "Flannel",
66
+ Calico = "Calico",
67
+ }
68
+
26
69
  export enum GetInsightAgentStatusRespInsightAgentStatus {
27
70
  NotInstall = "NotInstall",
28
71
  Install = "Install",
29
72
  }
30
73
 
74
+ export type InstallFileReq = {
75
+ cluster?: string
76
+ path?: string
77
+ gvr?: InstallFileReqGVR
78
+ }
79
+
80
+ export type InstallFileResp = {
81
+ message?: string
82
+ }
83
+
84
+ export type GetInstallVersionReq = {
85
+ cluster?: string
86
+ }
87
+
88
+ export type GetInstallVersionRespSupportVersion = {
89
+ minVersion?: string
90
+ maxVersion?: string
91
+ }
92
+
93
+ export type GetInstallVersionRespStatus = {
94
+ inRange?: boolean
95
+ }
96
+
97
+ export type GetInstallVersionResp = {
98
+ clusterVersion?: string
99
+ supportVersion?: GetInstallVersionRespSupportVersion
100
+ status?: GetInstallVersionRespStatus
101
+ }
102
+
103
+ export type RestartInstanceReq = {
104
+ workspaceId?: number
105
+ cluster?: string
106
+ namespace?: string
107
+ name?: string
108
+ extra?: string
109
+ }
110
+
111
+ export type RestartInstanceResp = {
112
+ message?: string
113
+ }
114
+
115
+ export type GetPermissionsListReq = {
116
+ workspaceId?: number
117
+ }
118
+
119
+ export type GetPermissionsListRespPermissions = {
120
+ getInstance?: boolean
121
+ createInstance?: boolean
122
+ updateInstance?: boolean
123
+ deleteInstance?: boolean
124
+ getMetric?: boolean
125
+ getInstanceLog?: boolean
126
+ getConfig?: boolean
127
+ updateConfig?: boolean
128
+ getBackup?: boolean
129
+ createBackup?: boolean
130
+ updateBackup?: boolean
131
+ deleteBackup?: boolean
132
+ getBackupConf?: boolean
133
+ createBackupConf?: boolean
134
+ updateBackupConf?: boolean
135
+ deleteBackupConf?: boolean
136
+ getTemplate?: boolean
137
+ createTemplate?: boolean
138
+ updateTemplate?: boolean
139
+ deleteTemplate?: boolean
140
+ getUserPassword?: boolean
141
+ exportTemplate?: boolean
142
+ importTemplate?: boolean
143
+ }
144
+
145
+ export type GetPermissionsListResp = {
146
+ permissionsBool?: GetPermissionsListRespPermissions
147
+ permissions?: PermissionsType[]
148
+ }
149
+
150
+ export type GetAllEventKindsListResp = {
151
+ data?: string[]
152
+ }
153
+
154
+ export type GetAllEventKindsListReq = {
155
+ cluster?: string
156
+ }
157
+
158
+ export type GetAllEventListReq = {
159
+ page?: number
160
+ pageSize?: number
161
+ sortDir?: GetAllEventListReqSortDir
162
+ sortBy?: string
163
+ searchKey?: string
164
+ cluster?: string
165
+ namespace?: string
166
+ name?: string
167
+ eventType?: EventType
168
+ kindName?: string
169
+ }
170
+
171
+ export type GetAllEventListRespItemsSource = {
172
+ component?: string
173
+ }
174
+
175
+ export type GetAllEventListRespItemsMetadata = {
176
+ uid?: string
177
+ name?: string
178
+ namespace?: string
179
+ annotations?: {[key: string]: string}
180
+ resourceVersion?: string
181
+ creationTimestamp?: string
182
+ }
183
+
184
+ export type GetAllEventListRespItemsInvolvedObject = {
185
+ uid?: string
186
+ kind?: string
187
+ name?: string
188
+ namespace?: string
189
+ apiVersion?: string
190
+ resourceVersion?: string
191
+ }
192
+
193
+ export type GetAllEventListRespItems = {
194
+ kind?: string
195
+ type?: string
196
+ count?: number
197
+ reason?: string
198
+ source?: GetAllEventListRespItemsSource
199
+ message?: string
200
+ metadata?: GetAllEventListRespItemsMetadata
201
+ apiVersion?: string
202
+ lastTimestamp?: string
203
+ firstTimestamp?: string
204
+ involvedObject?: GetAllEventListRespItemsInvolvedObject
205
+ reportingInstance?: string
206
+ reportingComponent?: string
207
+ }
208
+
209
+ export type GetAllEventListResp = {
210
+ items?: GetAllEventListRespItems[]
211
+ pagination?: CommonCommon.Pagination
212
+ }
213
+
31
214
  export type GetClusterNodeLabelListReq = {
32
215
  cluster?: string
33
216
  }
@@ -37,8 +220,32 @@ export type GetClusterNodeLabelListRespLabel = {
37
220
  value?: string[]
38
221
  }
39
222
 
223
+ export type GetClusterNodeLabelListRespNode2Label = {
224
+ nodeName?: string
225
+ label?: GetClusterNodeLabelListRespLabel[]
226
+ }
227
+
40
228
  export type GetClusterNodeLabelListResp = {
41
229
  items?: GetClusterNodeLabelListRespLabel[]
230
+ items1?: GetClusterNodeLabelListRespNode2Label[]
231
+ pagination?: CommonCommon.Pagination
232
+ }
233
+
234
+ export type GetClusterPodLabelListReq = {
235
+ page?: number
236
+ pageSize?: number
237
+ searchKey?: string
238
+ filterNamespace?: string
239
+ cluster?: string
240
+ }
241
+
242
+ export type GetClusterPodLabelListRespLabel = {
243
+ key?: string
244
+ value?: string[]
245
+ }
246
+
247
+ export type GetClusterPodLabelListResp = {
248
+ items?: GetClusterPodLabelListRespLabel[]
42
249
  pagination?: CommonCommon.Pagination
43
250
  }
44
251
 
@@ -56,6 +263,24 @@ export type EventSource = {
56
263
  host?: string
57
264
  }
58
265
 
266
+ export type GetMetallbIPAddressPoolsListReq = {
267
+ cluster?: string
268
+ }
269
+
270
+ export type GetMetallbIPAddressPoolsListRespItem = {
271
+ name?: string
272
+ addresses?: string[]
273
+ autoAssign?: boolean
274
+ avoidBuggyIPs?: boolean
275
+ }
276
+
277
+ export type GetMetallbIPAddressPoolsListResp = {
278
+ items?: GetMetallbIPAddressPoolsListRespItem[]
279
+ isSupportLb?: boolean
280
+ externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy[]
281
+ lbTyp?: CommonCommon.LBTyp[]
282
+ }
283
+
59
284
  export type GetEventListReq = {
60
285
  cluster?: string
61
286
  namespace?: string
@@ -96,6 +321,7 @@ export type GetWorkspaceListReq = {
96
321
  export type GetWorkspaceListRespItem = {
97
322
  workspaceId?: number
98
323
  alias?: string
324
+ visible?: boolean
99
325
  }
100
326
 
101
327
  export type GetWorkspaceListResp = {
@@ -103,15 +329,39 @@ export type GetWorkspaceListResp = {
103
329
  pagination?: CommonCommon.Pagination
104
330
  }
105
331
 
332
+ export type GetClusterHostnetworkPortsReq = {
333
+ workspaceId?: number
334
+ cluster?: string
335
+ }
336
+
106
337
  export type GetClusterListReq = {
107
338
  workspaceId?: number
339
+ searchKey?: string
340
+ }
341
+
342
+ export type GetClusterHostnetworkPortsResp = {
343
+ items?: number[]
108
344
  }
109
345
 
110
346
  export type GetClusterListResp = {
111
347
  items?: string[]
348
+ clusters?: ClusterItem[]
112
349
  pagination?: CommonCommon.Pagination
113
350
  }
114
351
 
352
+ export type ClusterItemMetadata = {
353
+ name?: string
354
+ }
355
+
356
+ export type ClusterItemStatus = {
357
+ networkMode?: ClusterItemNetworkMode[]
358
+ }
359
+
360
+ export type ClusterItem = {
361
+ metadata?: ClusterItemMetadata
362
+ status?: ClusterItemStatus
363
+ }
364
+
115
365
  export type GetClusterNamespaceListReq = {
116
366
  workspaceId?: number
117
367
  cluster?: string
@@ -119,6 +369,7 @@ export type GetClusterNamespaceListReq = {
119
369
 
120
370
  export type GetClusterNamespaceListResp = {
121
371
  items?: string[]
372
+ disableItems?: string[]
122
373
  pagination?: CommonCommon.Pagination
123
374
  }
124
375
 
@@ -128,28 +379,89 @@ export type GetInsightAgentStatusReq = {
128
379
 
129
380
  export type GetInsightAgentStatusResp = {
130
381
  status?: GetInsightAgentStatusRespInsightAgentStatus
382
+ clusterStatus?: CommonCommon.ClusterStatus
383
+ }
384
+
385
+ export type GetResourceQuotaReq = {
386
+ cluster?: string
387
+ namespace?: string
388
+ }
389
+
390
+ export type GetResourceQuotaRespMetadata = {
391
+ uid?: string
392
+ name?: string
393
+ namespace?: string
394
+ annotations?: {[key: string]: string}
395
+ resourceVersion?: string
396
+ creationTimestamp?: string
397
+ }
398
+
399
+ export type GetResourceQuotaRespSpec = {
400
+ hard?: {[key: string]: string}
401
+ }
402
+
403
+ export type GetResourceQuotaRespStatus = {
404
+ hard?: {[key: string]: string}
405
+ used?: {[key: string]: string}
406
+ available?: {[key: string]: string}
407
+ }
408
+
409
+ export type GetResourceQuotaResp = {
410
+ metadata?: GetResourceQuotaRespMetadata
411
+ spec?: GetResourceQuotaRespSpec
412
+ status?: GetResourceQuotaRespStatus
131
413
  }
132
414
 
133
415
  export class Cluster {
134
416
  static GetClusterList(req: GetClusterListReq, initReq?: fm.InitReq): Promise<GetClusterListResp> {
135
- return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
417
+ return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
418
+ }
419
+ static GetClusterHostnetworkPorts(req: GetClusterHostnetworkPortsReq, initReq?: fm.InitReq): Promise<GetClusterHostnetworkPortsResp> {
420
+ return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/hostnetwork-ports?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
136
421
  }
137
422
  static GetClusterNamespaceList(req: GetClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetClusterNamespaceListResp> {
138
- return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
423
+ return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
139
424
  }
140
425
  static GetClusterNodePortList(req: GetClusterNodePortListReq, initReq?: fm.InitReq): Promise<GetClusterNodePortListResp> {
141
- return fm.fetchReq<GetClusterNodePortListReq, GetClusterNodePortListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/nodeports?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
426
+ return fm.fetchReq<GetClusterNodePortListReq, GetClusterNodePortListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/nodeports?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
142
427
  }
143
428
  static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
144
- return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
429
+ return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
430
+ }
431
+ static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
432
+ return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
145
433
  }
146
434
  static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
147
- return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/mysql/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
435
+ return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/mysql/v1alpha2/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
148
436
  }
149
437
  static GetInsightAgentStatus(req: GetInsightAgentStatusReq, initReq?: fm.InitReq): Promise<GetInsightAgentStatusResp> {
150
- return fm.fetchReq<GetInsightAgentStatusReq, GetInsightAgentStatusResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/insight/status?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
438
+ return fm.fetchReq<GetInsightAgentStatusReq, GetInsightAgentStatusResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/insight/status?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
151
439
  }
152
440
  static GetEventList(req: GetEventListReq, initReq?: fm.InitReq): Promise<GetEventListResp> {
153
- return fm.fetchReq<GetEventListReq, GetEventListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/${req["namespace"]}/events?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
441
+ return fm.fetchReq<GetEventListReq, GetEventListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/events?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
442
+ }
443
+ static GetAllEventList(req: GetAllEventListReq, initReq?: fm.InitReq): Promise<GetAllEventListResp> {
444
+ return fm.fetchReq<GetAllEventListReq, GetAllEventListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/all-events?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
445
+ }
446
+ static GetAllEventKindsList(req: GetAllEventKindsListReq, initReq?: fm.InitReq): Promise<GetAllEventKindsListResp> {
447
+ return fm.fetchReq<GetAllEventKindsListReq, GetAllEventKindsListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/all-events-kinds?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
448
+ }
449
+ static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
450
+ return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
451
+ }
452
+ static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
453
+ return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
454
+ }
455
+ static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
456
+ return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
457
+ }
458
+ static InstallFile(req: InstallFileReq, initReq?: fm.InitReq): Promise<InstallFileResp> {
459
+ return fm.fetchReq<InstallFileReq, InstallFileResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/install-file`, {...initReq, method: "POST", body: JSON.stringify(req)})
460
+ }
461
+ static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
462
+ return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
463
+ }
464
+ static GetResourceQuota(req: GetResourceQuotaReq, initReq?: fm.InitReq): Promise<GetResourceQuotaResp> {
465
+ return fm.fetchReq<GetResourceQuotaReq, GetResourceQuotaResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/resourcequota?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
154
466
  }
155
467
  }
package/common.pb.ts CHANGED
@@ -4,6 +4,32 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ export enum ExternalTrafficPolicy {
8
+ Cluster = "Cluster",
9
+ Local = "Local",
10
+ }
11
+
12
+ export enum LBTyp {
13
+ MetalLB = "MetalLB",
14
+ Others = "Others",
15
+ }
16
+
17
+ export enum ServiceType {
18
+ ClusterIP = "ClusterIP",
19
+ NodePort = "NodePort",
20
+ LoadBalancer = "LoadBalancer",
21
+ }
22
+
23
+ export enum ClusterStatus {
24
+ UNSPECIFIED = "UNSPECIFIED",
25
+ Unknown = "Unknown",
26
+ Creating = "Creating",
27
+ Running = "Running",
28
+ Updating = "Updating",
29
+ Deleting = "Deleting",
30
+ Failed = "Failed",
31
+ }
32
+
7
33
  export enum PageInfoReqSortDir {
8
34
  ASC = "ASC",
9
35
  DESC = "DESC",
@@ -24,6 +50,14 @@ export enum PodCommonConditionStatus {
24
50
  PodConditionStatusFalse = "PodConditionStatusFalse",
25
51
  }
26
52
 
53
+ export enum PodCommonFilterPodStatus {
54
+ UNSPECIFIED = "UNSPECIFIED",
55
+ RUNNING = "RUNNING",
56
+ ERROR = "ERROR",
57
+ COMPLETED = "COMPLETED",
58
+ WAITING = "WAITING",
59
+ }
60
+
27
61
  export type Affinity = {
28
62
  nodeAffinity?: NodeAffinity
29
63
  podAffinity?: PodAffinity
@@ -129,10 +163,75 @@ export type PodCommon = {
129
163
  cpuLimit?: number
130
164
  memoryUsage?: number
131
165
  memoryLimit?: number
166
+ pvUsedInGb?: number
167
+ pvAllocatedInGb?: number
132
168
  conditions?: PodCommonCondition[]
169
+ containersName?: string[]
170
+ ownerReference?: OwnerReference[]
171
+ initContainersName?: string[]
172
+ initContainersStatuses?: ContainerStatus[]
173
+ containersStatuses?: ContainerStatus[]
174
+ podStatus?: string
175
+ }
176
+
177
+ export type OwnerReference = {
178
+ uid?: string
179
+ controller?: boolean
180
+ name?: string
181
+ kind?: string
133
182
  }
134
183
 
135
184
  export type CommonItemStatus = {
136
185
  serviceAddresses?: string[]
137
186
  webManagerAddress?: string
187
+ webLogAddress?: string
188
+ avgPvAllocatedInGb?: number
189
+ avgPvUsedInGb?: number
190
+ cpuUtilization?: number
191
+ memoryUtilization?: number
192
+ clusterStatus?: ClusterStatus
193
+ }
194
+
195
+ export type AccessWhitelistInternal = {
196
+ namespace?: string
197
+ podSelector?: {[key: string]: string}
198
+ }
199
+
200
+ export type AccessWhitelistExternal = {
201
+ cidr?: string
202
+ ip?: string
203
+ }
204
+
205
+ export type AccessWhitelist = {
206
+ internals?: AccessWhitelistInternal[]
207
+ externals?: AccessWhitelistExternal[]
208
+ }
209
+
210
+ export type ContainerStatus = {
211
+ name?: string
212
+ state?: ContainerState
213
+ }
214
+
215
+ export type ContainerState = {
216
+ waiting?: ContainerStateWaiting
217
+ running?: ContainerStateRunning
218
+ terminated?: ContainerStateTerminated
219
+ }
220
+
221
+ export type ContainerStateWaiting = {
222
+ reason?: string
223
+ message?: string
224
+ }
225
+
226
+ export type ContainerStateRunning = {
227
+ startedAt?: string
228
+ }
229
+
230
+ export type ContainerStateTerminated = {
231
+ exitCode?: number
232
+ signal?: number
233
+ reason?: string
234
+ message?: string
235
+ startedAt?: string
236
+ finishedAt?: string
138
237
  }
package/insight.pb.ts CHANGED
@@ -20,27 +20,23 @@ export enum TargetType {
20
20
  DEPLOYMENT = "DEPLOYMENT",
21
21
  STATEFULSET = "STATEFULSET",
22
22
  DAEMONSET = "DAEMONSET",
23
- CRONJOB = "CRONJOB",
24
23
  POD = "POD",
25
24
  }
26
25
 
27
- export enum AlertStatus {
28
- ALERT_STATUS_UNSPECIFIED = "ALERT_STATUS_UNSPECIFIED",
29
- ALERT_STATUS_FIRING = "ALERT_STATUS_FIRING",
30
- ALERT_STATUS_RESOLVED = "ALERT_STATUS_RESOLVED",
31
- }
32
-
33
26
  export type AlertSummary = {
34
- alertId?: string
27
+ id?: string
28
+ groupName?: string
29
+ groupId?: string
35
30
  ruleName?: string
36
- severity?: Severity
31
+ ruleId?: string
37
32
  clusterName?: string
38
33
  namespace?: string
39
34
  targetType?: TargetType
40
- targetName?: string
41
- status?: AlertStatus
35
+ target?: string
36
+ severity?: Severity
37
+ value?: string
38
+ notifyResponse?: string
42
39
  description?: string
43
40
  startAt?: string
44
41
  updateAt?: string
45
- notifyResponse?: string
46
42
  }
package/metric.pb.ts CHANGED
@@ -7,7 +7,18 @@
7
7
  import * as CommonCommon from "./common.pb"
8
8
  import * as fm from "./fetch.pb"
9
9
  import * as InsightIoApiInsightV1alpha1Insight from "./insight.pb"
10
+
11
+ export enum GetAlertsListReqSortDir {
12
+ ASC = "ASC",
13
+ DESC = "DESC",
14
+ }
15
+
10
16
  export type GetAlertsListReq = {
17
+ page?: number
18
+ pageSize?: number
19
+ sortDir?: GetAlertsListReqSortDir
20
+ sortBy?: string
21
+ searchKey?: string
11
22
  cluster?: string
12
23
  namespace?: string
13
24
  name?: string
@@ -20,6 +31,6 @@ export type GetAlertsListResp = {
20
31
 
21
32
  export class Metric {
22
33
  static GetAlertsList(req: GetAlertsListReq, initReq?: fm.InitReq): Promise<GetAlertsListResp> {
23
- return fm.fetchReq<GetAlertsListReq, GetAlertsListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/${req["namespace"]}/${req["name"]}/alerts?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
34
+ return fm.fetchReq<GetAlertsListReq, GetAlertsListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/alerts?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
24
35
  }
25
36
  }