@daocloud-proto/mcamel-postgresql 0.0.2-64 → 0.0.2-641

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.
package/cloudshell.pb.ts CHANGED
@@ -67,12 +67,12 @@ export type GetorDeleteCloudShellRequest = {
67
67
 
68
68
  export class CloudShellService {
69
69
  static CreateCloudShell(req: CreateCloudShellRequest, initReq?: fm.InitReq): Promise<CloudShell> {
70
- return fm.fetchReq<CreateCloudShellRequest, CloudShell>(`/apis/mcamel.io/postgresql/v1alpha1/cloudshells`, {...initReq, method: "POST", body: JSON.stringify(req)})
70
+ return fm.fetchReq<CreateCloudShellRequest, CloudShell>(`/apis/mcamel.io/postgresql/v1alpha2/cloudshells`, {...initReq, method: "POST", body: JSON.stringify(req)})
71
71
  }
72
72
  static GetCloudShell(req: GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<CloudShell> {
73
- return fm.fetchReq<GetorDeleteCloudShellRequest, CloudShell>(`/apis/mcamel.io/postgresql/v1alpha1/cloudshells/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
73
+ return fm.fetchReq<GetorDeleteCloudShellRequest, CloudShell>(`/apis/mcamel.io/postgresql/v1alpha2/cloudshells/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
74
74
  }
75
75
  static DeleteCloudShell(req: GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
76
- return fm.fetchReq<GetorDeleteCloudShellRequest, GoogleProtobufEmpty.Empty>(`/apis/mcamel.io/postgresql/v1alpha1/cloudshells/${req["name"]}`, {...initReq, method: "DELETE"})
76
+ return fm.fetchReq<GetorDeleteCloudShellRequest, GoogleProtobufEmpty.Empty>(`/apis/mcamel.io/postgresql/v1alpha2/cloudshells/${req["name"]}`, {...initReq, method: "DELETE"})
77
77
  }
78
78
  }
package/cluster.pb.ts CHANGED
@@ -7,12 +7,44 @@
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
+
16
48
  export enum GetAllEventListReqSortDir {
17
49
  ASC = "ASC",
18
50
  DESC = "DESC",
@@ -28,11 +60,121 @@ export enum GetWorkspaceListReqSortDir {
28
60
  DESC = "DESC",
29
61
  }
30
62
 
63
+ export enum ClusterItemNetworkMode {
64
+ Unknown = "Unknown",
65
+ Flannel = "Flannel",
66
+ Calico = "Calico",
67
+ }
68
+
69
+ export enum ClusterSettingPluginPluginName {
70
+ PLUGIN_NAME_UNSPECIFIED = "PLUGIN_NAME_UNSPECIFIED",
71
+ HPA = "HPA",
72
+ Insight = "Insight",
73
+ GPU = "GPU",
74
+ METALLB = "METALLB",
75
+ Spiderpool = "Spiderpool",
76
+ CustomMetrics = "CustomMetrics",
77
+ CronHPA = "CronHPA",
78
+ VPA = "VPA",
79
+ Hwameistor = "Hwameistor",
80
+ Flannel = "Flannel",
81
+ KubeOvn = "KubeOvn",
82
+ OLM = "OLM",
83
+ EgressGateway = "EgressGateway",
84
+ Snapshot = "Snapshot",
85
+ DRA = "DRA",
86
+ }
87
+
31
88
  export enum GetInsightAgentStatusRespInsightAgentStatus {
32
89
  NotInstall = "NotInstall",
33
90
  Install = "Install",
34
91
  }
35
92
 
93
+ export type GetClusterReq = {
94
+ workspaceId?: number
95
+ name?: string
96
+ }
97
+
98
+ export type GetClusterResp = {
99
+ cluster?: ClusterItem
100
+ }
101
+
102
+ export type InstallFileReq = {
103
+ cluster?: string
104
+ path?: string
105
+ gvr?: InstallFileReqGVR
106
+ }
107
+
108
+ export type InstallFileResp = {
109
+ message?: string
110
+ }
111
+
112
+ export type GetInstallVersionReq = {
113
+ cluster?: string
114
+ }
115
+
116
+ export type GetInstallVersionRespSupportVersion = {
117
+ minVersion?: string
118
+ maxVersion?: string
119
+ }
120
+
121
+ export type GetInstallVersionRespStatus = {
122
+ inRange?: boolean
123
+ }
124
+
125
+ export type GetInstallVersionResp = {
126
+ clusterVersion?: string
127
+ supportVersion?: GetInstallVersionRespSupportVersion
128
+ status?: GetInstallVersionRespStatus
129
+ }
130
+
131
+ export type RestartInstanceReq = {
132
+ workspaceId?: number
133
+ cluster?: string
134
+ namespace?: string
135
+ name?: string
136
+ extra?: string
137
+ }
138
+
139
+ export type RestartInstanceResp = {
140
+ message?: string
141
+ }
142
+
143
+ export type GetPermissionsListReq = {
144
+ workspaceId?: number
145
+ }
146
+
147
+ export type GetPermissionsListRespPermissions = {
148
+ getInstance?: boolean
149
+ createInstance?: boolean
150
+ updateInstance?: boolean
151
+ deleteInstance?: boolean
152
+ getMetric?: boolean
153
+ getInstanceLog?: boolean
154
+ getConfig?: boolean
155
+ updateConfig?: boolean
156
+ getBackup?: boolean
157
+ createBackup?: boolean
158
+ updateBackup?: boolean
159
+ deleteBackup?: boolean
160
+ getBackupConf?: boolean
161
+ createBackupConf?: boolean
162
+ updateBackupConf?: boolean
163
+ deleteBackupConf?: boolean
164
+ getTemplate?: boolean
165
+ createTemplate?: boolean
166
+ updateTemplate?: boolean
167
+ deleteTemplate?: boolean
168
+ getUserPassword?: boolean
169
+ exportTemplate?: boolean
170
+ importTemplate?: boolean
171
+ }
172
+
173
+ export type GetPermissionsListResp = {
174
+ permissionsBool?: GetPermissionsListRespPermissions
175
+ permissions?: PermissionsType[]
176
+ }
177
+
36
178
  export type GetAllEventKindsListResp = {
37
179
  data?: string[]
38
180
  }
@@ -52,6 +194,7 @@ export type GetAllEventListReq = {
52
194
  name?: string
53
195
  eventType?: EventType
54
196
  kindName?: string
197
+ workspaceId?: number
55
198
  }
56
199
 
57
200
  export type GetAllEventListRespItemsSource = {
@@ -106,8 +249,32 @@ export type GetClusterNodeLabelListRespLabel = {
106
249
  value?: string[]
107
250
  }
108
251
 
252
+ export type GetClusterNodeLabelListRespNode2Label = {
253
+ nodeName?: string
254
+ label?: GetClusterNodeLabelListRespLabel[]
255
+ }
256
+
109
257
  export type GetClusterNodeLabelListResp = {
110
258
  items?: GetClusterNodeLabelListRespLabel[]
259
+ items1?: GetClusterNodeLabelListRespNode2Label[]
260
+ pagination?: CommonCommon.Pagination
261
+ }
262
+
263
+ export type GetClusterPodLabelListReq = {
264
+ page?: number
265
+ pageSize?: number
266
+ searchKey?: string
267
+ filterNamespace?: string
268
+ cluster?: string
269
+ }
270
+
271
+ export type GetClusterPodLabelListRespLabel = {
272
+ key?: string
273
+ value?: string[]
274
+ }
275
+
276
+ export type GetClusterPodLabelListResp = {
277
+ items?: GetClusterPodLabelListRespLabel[]
111
278
  pagination?: CommonCommon.Pagination
112
279
  }
113
280
 
@@ -183,6 +350,7 @@ export type GetWorkspaceListReq = {
183
350
  export type GetWorkspaceListRespItem = {
184
351
  workspaceId?: number
185
352
  alias?: string
353
+ visible?: boolean
186
354
  }
187
355
 
188
356
  export type GetWorkspaceListResp = {
@@ -190,15 +358,55 @@ export type GetWorkspaceListResp = {
190
358
  pagination?: CommonCommon.Pagination
191
359
  }
192
360
 
361
+ export type GetClusterHostnetworkPortsReq = {
362
+ workspaceId?: number
363
+ cluster?: string
364
+ }
365
+
193
366
  export type GetClusterListReq = {
194
367
  workspaceId?: number
368
+ searchKey?: string
369
+ }
370
+
371
+ export type GetClusterHostnetworkPortsResp = {
372
+ items?: number[]
195
373
  }
196
374
 
197
375
  export type GetClusterListResp = {
198
376
  items?: string[]
377
+ clusters?: ClusterItem[]
199
378
  pagination?: CommonCommon.Pagination
200
379
  }
201
380
 
381
+ export type ClusterItemMetadata = {
382
+ name?: string
383
+ }
384
+
385
+ export type ClusterItemStatus = {
386
+ networkMode?: ClusterItemNetworkMode[]
387
+ setting?: ClusterSetting
388
+ clusterStatus?: CommonCommon.ClusterStatus
389
+ }
390
+
391
+ export type ClusterItem = {
392
+ metadata?: ClusterItemMetadata
393
+ status?: ClusterItemStatus
394
+ }
395
+
396
+ export type ClusterSettingPlugin = {
397
+ name?: ClusterSettingPluginPluginName
398
+ enabled?: boolean
399
+ intelligentDetection?: boolean
400
+ externalAddress?: string
401
+ setting?: string
402
+ healthy?: boolean
403
+ }
404
+
405
+ export type ClusterSetting = {
406
+ plugins?: ClusterSettingPlugin[]
407
+ network?: ClusterSettingPlugin[]
408
+ }
409
+
202
410
  export type GetClusterNamespaceListReq = {
203
411
  workspaceId?: number
204
412
  cluster?: string
@@ -206,6 +414,7 @@ export type GetClusterNamespaceListReq = {
206
414
 
207
415
  export type GetClusterNamespaceListResp = {
208
416
  items?: string[]
417
+ disableItems?: string[]
209
418
  pagination?: CommonCommon.Pagination
210
419
  }
211
420
 
@@ -215,37 +424,92 @@ export type GetInsightAgentStatusReq = {
215
424
 
216
425
  export type GetInsightAgentStatusResp = {
217
426
  status?: GetInsightAgentStatusRespInsightAgentStatus
427
+ clusterStatus?: CommonCommon.ClusterStatus
428
+ }
429
+
430
+ export type GetResourceQuotaReq = {
431
+ cluster?: string
432
+ namespace?: string
433
+ }
434
+
435
+ export type GetResourceQuotaRespMetadata = {
436
+ uid?: string
437
+ name?: string
438
+ namespace?: string
439
+ annotations?: {[key: string]: string}
440
+ resourceVersion?: string
441
+ creationTimestamp?: string
442
+ }
443
+
444
+ export type GetResourceQuotaRespSpec = {
445
+ hard?: {[key: string]: string}
446
+ }
447
+
448
+ export type GetResourceQuotaRespStatus = {
449
+ hard?: {[key: string]: string}
450
+ used?: {[key: string]: string}
451
+ available?: {[key: string]: string}
452
+ }
453
+
454
+ export type GetResourceQuotaResp = {
455
+ metadata?: GetResourceQuotaRespMetadata
456
+ spec?: GetResourceQuotaRespSpec
457
+ status?: GetResourceQuotaRespStatus
218
458
  }
219
459
 
220
460
  export class Cluster {
221
461
  static GetClusterList(req: GetClusterListReq, initReq?: fm.InitReq): Promise<GetClusterListResp> {
222
- return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
462
+ return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
463
+ }
464
+ static GetCluster(req: GetClusterReq, initReq?: fm.InitReq): Promise<GetClusterResp> {
465
+ return fm.fetchReq<GetClusterReq, GetClusterResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["workspaceId"]}/clusters/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
466
+ }
467
+ static GetClusterHostnetworkPorts(req: GetClusterHostnetworkPortsReq, initReq?: fm.InitReq): Promise<GetClusterHostnetworkPortsResp> {
468
+ return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["workspaceId"]}/hostnetwork-ports?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
223
469
  }
224
470
  static GetClusterNamespaceList(req: GetClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetClusterNamespaceListResp> {
225
- return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
471
+ return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
226
472
  }
227
473
  static GetClusterNodePortList(req: GetClusterNodePortListReq, initReq?: fm.InitReq): Promise<GetClusterNodePortListResp> {
228
- return fm.fetchReq<GetClusterNodePortListReq, GetClusterNodePortListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/nodeports?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
474
+ return fm.fetchReq<GetClusterNodePortListReq, GetClusterNodePortListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/nodeports?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
229
475
  }
230
476
  static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
231
- return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
477
+ return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
478
+ }
479
+ static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
480
+ return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
232
481
  }
233
482
  static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
234
- return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
483
+ return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/postgresql/v1alpha2/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
235
484
  }
236
485
  static GetInsightAgentStatus(req: GetInsightAgentStatusReq, initReq?: fm.InitReq): Promise<GetInsightAgentStatusResp> {
237
- return fm.fetchReq<GetInsightAgentStatusReq, GetInsightAgentStatusResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/insight/status?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
486
+ return fm.fetchReq<GetInsightAgentStatusReq, GetInsightAgentStatusResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/insight/status?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
238
487
  }
239
488
  static GetEventList(req: GetEventListReq, initReq?: fm.InitReq): Promise<GetEventListResp> {
240
- return fm.fetchReq<GetEventListReq, GetEventListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/${req["namespace"]}/events?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
489
+ return fm.fetchReq<GetEventListReq, GetEventListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/${req["namespace"]}/events?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
241
490
  }
242
491
  static GetAllEventList(req: GetAllEventListReq, initReq?: fm.InitReq): Promise<GetAllEventListResp> {
243
- return fm.fetchReq<GetAllEventListReq, GetAllEventListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/${req["namespace"]}/${req["name"]}/all-events?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
492
+ return fm.fetchReq<GetAllEventListReq, GetAllEventListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["workspaceId"]}/${req["cluster"]}/${req["namespace"]}/${req["name"]}/all-events?${fm.renderURLSearchParams(req, ["workspaceId", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
244
493
  }
245
494
  static GetAllEventKindsList(req: GetAllEventKindsListReq, initReq?: fm.InitReq): Promise<GetAllEventKindsListResp> {
246
- return fm.fetchReq<GetAllEventKindsListReq, GetAllEventKindsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/all-events-kinds?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
495
+ return fm.fetchReq<GetAllEventKindsListReq, GetAllEventKindsListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/all-events-kinds?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
247
496
  }
248
497
  static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
249
- return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
498
+ return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
499
+ }
500
+ static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
501
+ return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
502
+ }
503
+ static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
504
+ return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
505
+ }
506
+ static InstallFile(req: InstallFileReq, initReq?: fm.InitReq): Promise<InstallFileResp> {
507
+ return fm.fetchReq<InstallFileReq, InstallFileResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/install-file`, {...initReq, method: "POST", body: JSON.stringify(req)})
508
+ }
509
+ static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
510
+ return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
511
+ }
512
+ static GetResourceQuota(req: GetResourceQuotaReq, initReq?: fm.InitReq): Promise<GetResourceQuotaResp> {
513
+ return fm.fetchReq<GetResourceQuotaReq, GetResourceQuotaResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/${req["namespace"]}/resourcequota?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
250
514
  }
251
515
  }
package/common.pb.ts CHANGED
@@ -4,6 +4,14 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ export enum FilterPodStatus {
8
+ FILTER_POD_STATUS_UNSPECIFIED = "FILTER_POD_STATUS_UNSPECIFIED",
9
+ FILTER_POD_STATUS_RUNNING = "FILTER_POD_STATUS_RUNNING",
10
+ FILTER_POD_STATUS_ERROR = "FILTER_POD_STATUS_ERROR",
11
+ FILTER_POD_STATUS_COMPLETED = "FILTER_POD_STATUS_COMPLETED",
12
+ FILTER_POD_STATUS_WAITING = "FILTER_POD_STATUS_WAITING",
13
+ }
14
+
7
15
  export enum ExternalTrafficPolicy {
8
16
  Cluster = "Cluster",
9
17
  Local = "Local",
@@ -20,6 +28,16 @@ export enum ServiceType {
20
28
  LoadBalancer = "LoadBalancer",
21
29
  }
22
30
 
31
+ export enum ClusterStatus {
32
+ UNSPECIFIED = "UNSPECIFIED",
33
+ Unknown = "Unknown",
34
+ Creating = "Creating",
35
+ Running = "Running",
36
+ Updating = "Updating",
37
+ Deleting = "Deleting",
38
+ Failed = "Failed",
39
+ }
40
+
23
41
  export enum PageInfoReqSortDir {
24
42
  ASC = "ASC",
25
43
  DESC = "DESC",
@@ -151,6 +169,11 @@ export type PodCommon = {
151
169
  containersName?: string[]
152
170
  ownerReference?: OwnerReference[]
153
171
  initContainersName?: string[]
172
+ initContainersStatuses?: ContainerStatus[]
173
+ containersStatuses?: ContainerStatus[]
174
+ podStatus?: string
175
+ annotations?: {[key: string]: string}
176
+ filterPodStatus?: FilterPodStatus
154
177
  }
155
178
 
156
179
  export type OwnerReference = {
@@ -164,4 +187,53 @@ export type CommonItemStatus = {
164
187
  serviceAddresses?: string[]
165
188
  webManagerAddress?: string
166
189
  webLogAddress?: string
190
+ avgPvAllocatedInGb?: number
191
+ avgPvUsedInGb?: number
192
+ cpuUtilization?: number
193
+ memoryUtilization?: number
194
+ clusterStatus?: ClusterStatus
195
+ }
196
+
197
+ export type AccessWhitelistInternal = {
198
+ namespace?: string
199
+ podSelector?: {[key: string]: string}
200
+ }
201
+
202
+ export type AccessWhitelistExternal = {
203
+ cidr?: string
204
+ ip?: string
205
+ }
206
+
207
+ export type AccessWhitelist = {
208
+ internals?: AccessWhitelistInternal[]
209
+ externals?: AccessWhitelistExternal[]
210
+ }
211
+
212
+ export type ContainerStatus = {
213
+ name?: string
214
+ state?: ContainerState
215
+ }
216
+
217
+ export type ContainerState = {
218
+ waiting?: ContainerStateWaiting
219
+ running?: ContainerStateRunning
220
+ terminated?: ContainerStateTerminated
221
+ }
222
+
223
+ export type ContainerStateWaiting = {
224
+ reason?: string
225
+ message?: string
226
+ }
227
+
228
+ export type ContainerStateRunning = {
229
+ startedAt?: string
230
+ }
231
+
232
+ export type ContainerStateTerminated = {
233
+ exitCode?: number
234
+ signal?: number
235
+ reason?: string
236
+ message?: string
237
+ startedAt?: string
238
+ finishedAt?: string
167
239
  }
package/metric.pb.ts CHANGED
@@ -7,10 +7,22 @@
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
25
+ workspaceId?: number
14
26
  }
15
27
 
16
28
  export type GetAlertsListResp = {
@@ -20,6 +32,6 @@ export type GetAlertsListResp = {
20
32
 
21
33
  export class Metric {
22
34
  static GetAlertsList(req: GetAlertsListReq, initReq?: fm.InitReq): Promise<GetAlertsListResp> {
23
- return fm.fetchReq<GetAlertsListReq, GetAlertsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/${req["namespace"]}/${req["name"]}/alerts?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
35
+ return fm.fetchReq<GetAlertsListReq, GetAlertsListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["workspaceId"]}/${req["cluster"]}/${req["namespace"]}/${req["name"]}/alerts?${fm.renderURLSearchParams(req, ["workspaceId", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
24
36
  }
25
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-postgresql",
3
- "version":"0.0.2-64",
3
+ "version":"0.0.2-641",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {