@daocloud-proto/mcamel-postgresql 0.0.2-7 → 0.0.2-700-g709fb4ff
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 +3 -3
- package/cluster.pb.ts +364 -9
- package/common.pb.ts +89 -2
- package/insight.pb.ts +8 -12
- package/metric.pb.ts +13 -1
- package/package.json +1 -1
- package/postgresql.pb.ts +373 -25
- package/storage_config.pb.ts +188 -0
- package/template.pb.ts +200 -0
- package/version.pb.ts +8 -1
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/
|
|
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/
|
|
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/
|
|
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,50 @@
|
|
|
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 GetClusterNodeTaintListRespTaintEffect {
|
|
44
|
+
NoSchedule = "NoSchedule",
|
|
45
|
+
PreferNoSchedule = "PreferNoSchedule",
|
|
46
|
+
NoExecute = "NoExecute",
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export enum InstallFileReqGVR {
|
|
50
|
+
None = "None",
|
|
51
|
+
CustomResourceDefinition = "CustomResourceDefinition",
|
|
52
|
+
}
|
|
53
|
+
|
|
16
54
|
export enum GetAllEventListReqSortDir {
|
|
17
55
|
ASC = "ASC",
|
|
18
56
|
DESC = "DESC",
|
|
@@ -28,11 +66,181 @@ export enum GetWorkspaceListReqSortDir {
|
|
|
28
66
|
DESC = "DESC",
|
|
29
67
|
}
|
|
30
68
|
|
|
69
|
+
export enum ClusterItemNetworkMode {
|
|
70
|
+
Unknown = "Unknown",
|
|
71
|
+
Flannel = "Flannel",
|
|
72
|
+
Calico = "Calico",
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export enum ClusterSettingPluginPluginName {
|
|
76
|
+
PLUGIN_NAME_UNSPECIFIED = "PLUGIN_NAME_UNSPECIFIED",
|
|
77
|
+
HPA = "HPA",
|
|
78
|
+
Insight = "Insight",
|
|
79
|
+
GPU = "GPU",
|
|
80
|
+
METALLB = "METALLB",
|
|
81
|
+
Spiderpool = "Spiderpool",
|
|
82
|
+
CustomMetrics = "CustomMetrics",
|
|
83
|
+
CronHPA = "CronHPA",
|
|
84
|
+
VPA = "VPA",
|
|
85
|
+
Hwameistor = "Hwameistor",
|
|
86
|
+
Flannel = "Flannel",
|
|
87
|
+
KubeOvn = "KubeOvn",
|
|
88
|
+
OLM = "OLM",
|
|
89
|
+
EgressGateway = "EgressGateway",
|
|
90
|
+
Snapshot = "Snapshot",
|
|
91
|
+
DRA = "DRA",
|
|
92
|
+
}
|
|
93
|
+
|
|
31
94
|
export enum GetInsightAgentStatusRespInsightAgentStatus {
|
|
32
95
|
NotInstall = "NotInstall",
|
|
33
96
|
Install = "Install",
|
|
34
97
|
}
|
|
35
98
|
|
|
99
|
+
export type GetAllVisibleWorkspaceClusterListReq = {
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export type GetAllVisibleWorkspaceClusterListResp = {
|
|
103
|
+
clusters?: ClusterItem[]
|
|
104
|
+
pagination?: CommonCommon.Pagination
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type GetAllVisibleWorkspaceClusterNamespaceListReq = {
|
|
108
|
+
cluster?: string
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type GetAllVisibleWorkspaceClusterNamespaceListResp = {
|
|
112
|
+
items?: WorkspaceClusterNamespace[]
|
|
113
|
+
pagination?: CommonCommon.Pagination
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type WorkspaceClusterNamespace = {
|
|
117
|
+
namespace?: string
|
|
118
|
+
cluster?: string
|
|
119
|
+
workspaceId?: string
|
|
120
|
+
workspaceName?: string
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type GetClusterNodeTaintListReq = {
|
|
124
|
+
cluster?: string
|
|
125
|
+
nodeName?: string
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export type GetClusterNodeTaintListRespTaint = {
|
|
129
|
+
key?: string
|
|
130
|
+
value?: string
|
|
131
|
+
effect?: GetClusterNodeTaintListRespTaintEffect
|
|
132
|
+
nodeName?: string
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export type GetClusterNodeTaintListResp = {
|
|
136
|
+
items?: GetClusterNodeTaintListRespTaint[]
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export type GetClusterNodeListReq = {
|
|
140
|
+
cluster?: string
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export type GetClusterNodeListRespNode = {
|
|
144
|
+
name?: string
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type GetClusterNodeListResp = {
|
|
148
|
+
items?: GetClusterNodeListRespNode[]
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export type GetClusterReq = {
|
|
152
|
+
workspaceId?: number
|
|
153
|
+
name?: string
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export type GetClusterResp = {
|
|
157
|
+
cluster?: ClusterItem
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export type InstallFileReq = {
|
|
161
|
+
cluster?: string
|
|
162
|
+
path?: string
|
|
163
|
+
gvr?: InstallFileReqGVR
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type InstallFileResp = {
|
|
167
|
+
message?: string
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export type GetInstallVersionReq = {
|
|
171
|
+
cluster?: string
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export type GetInstallVersionRespSupportVersion = {
|
|
175
|
+
minVersion?: string
|
|
176
|
+
maxVersion?: string
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export type GetInstallVersionRespStatus = {
|
|
180
|
+
inRange?: boolean
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export type GetInstallVersionResp = {
|
|
184
|
+
clusterVersion?: string
|
|
185
|
+
supportVersion?: GetInstallVersionRespSupportVersion
|
|
186
|
+
status?: GetInstallVersionRespStatus
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export type RestartInstanceReq = {
|
|
190
|
+
workspaceId?: number
|
|
191
|
+
cluster?: string
|
|
192
|
+
namespace?: string
|
|
193
|
+
name?: string
|
|
194
|
+
extra?: string
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export type RestartInstanceResp = {
|
|
198
|
+
message?: string
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export type GetPermissionsListReq = {
|
|
202
|
+
workspaceId?: number
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export type GetPermissionsListRespPermissions = {
|
|
206
|
+
getInstance?: boolean
|
|
207
|
+
createInstance?: boolean
|
|
208
|
+
updateInstance?: boolean
|
|
209
|
+
deleteInstance?: boolean
|
|
210
|
+
getMetric?: boolean
|
|
211
|
+
getInstanceLog?: boolean
|
|
212
|
+
getConfig?: boolean
|
|
213
|
+
updateConfig?: boolean
|
|
214
|
+
getBackup?: boolean
|
|
215
|
+
createBackup?: boolean
|
|
216
|
+
updateBackup?: boolean
|
|
217
|
+
deleteBackup?: boolean
|
|
218
|
+
getBackupConf?: boolean
|
|
219
|
+
createBackupConf?: boolean
|
|
220
|
+
updateBackupConf?: boolean
|
|
221
|
+
deleteBackupConf?: boolean
|
|
222
|
+
getTemplate?: boolean
|
|
223
|
+
createTemplate?: boolean
|
|
224
|
+
updateTemplate?: boolean
|
|
225
|
+
deleteTemplate?: boolean
|
|
226
|
+
getUserPassword?: boolean
|
|
227
|
+
exportTemplate?: boolean
|
|
228
|
+
importTemplate?: boolean
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export type GetPermissionsListResp = {
|
|
232
|
+
permissionsBool?: GetPermissionsListRespPermissions
|
|
233
|
+
permissions?: PermissionsType[]
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export type GetAllEventKindsListResp = {
|
|
237
|
+
data?: string[]
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export type GetAllEventKindsListReq = {
|
|
241
|
+
cluster?: string
|
|
242
|
+
}
|
|
243
|
+
|
|
36
244
|
export type GetAllEventListReq = {
|
|
37
245
|
page?: number
|
|
38
246
|
pageSize?: number
|
|
@@ -43,6 +251,8 @@ export type GetAllEventListReq = {
|
|
|
43
251
|
namespace?: string
|
|
44
252
|
name?: string
|
|
45
253
|
eventType?: EventType
|
|
254
|
+
kindName?: string
|
|
255
|
+
workspaceId?: number
|
|
46
256
|
}
|
|
47
257
|
|
|
48
258
|
export type GetAllEventListRespItemsSource = {
|
|
@@ -97,8 +307,32 @@ export type GetClusterNodeLabelListRespLabel = {
|
|
|
97
307
|
value?: string[]
|
|
98
308
|
}
|
|
99
309
|
|
|
310
|
+
export type GetClusterNodeLabelListRespNode2Label = {
|
|
311
|
+
nodeName?: string
|
|
312
|
+
label?: GetClusterNodeLabelListRespLabel[]
|
|
313
|
+
}
|
|
314
|
+
|
|
100
315
|
export type GetClusterNodeLabelListResp = {
|
|
101
316
|
items?: GetClusterNodeLabelListRespLabel[]
|
|
317
|
+
items1?: GetClusterNodeLabelListRespNode2Label[]
|
|
318
|
+
pagination?: CommonCommon.Pagination
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export type GetClusterPodLabelListReq = {
|
|
322
|
+
page?: number
|
|
323
|
+
pageSize?: number
|
|
324
|
+
searchKey?: string
|
|
325
|
+
filterNamespace?: string
|
|
326
|
+
cluster?: string
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export type GetClusterPodLabelListRespLabel = {
|
|
330
|
+
key?: string
|
|
331
|
+
value?: string[]
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export type GetClusterPodLabelListResp = {
|
|
335
|
+
items?: GetClusterPodLabelListRespLabel[]
|
|
102
336
|
pagination?: CommonCommon.Pagination
|
|
103
337
|
}
|
|
104
338
|
|
|
@@ -174,6 +408,7 @@ export type GetWorkspaceListReq = {
|
|
|
174
408
|
export type GetWorkspaceListRespItem = {
|
|
175
409
|
workspaceId?: number
|
|
176
410
|
alias?: string
|
|
411
|
+
visible?: boolean
|
|
177
412
|
}
|
|
178
413
|
|
|
179
414
|
export type GetWorkspaceListResp = {
|
|
@@ -181,15 +416,61 @@ export type GetWorkspaceListResp = {
|
|
|
181
416
|
pagination?: CommonCommon.Pagination
|
|
182
417
|
}
|
|
183
418
|
|
|
419
|
+
export type GetClusterHostnetworkPortsReq = {
|
|
420
|
+
workspaceId?: number
|
|
421
|
+
cluster?: string
|
|
422
|
+
}
|
|
423
|
+
|
|
184
424
|
export type GetClusterListReq = {
|
|
185
425
|
workspaceId?: number
|
|
426
|
+
searchKey?: string
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export type GetClusterHostnetworkPortsResp = {
|
|
430
|
+
items?: number[]
|
|
186
431
|
}
|
|
187
432
|
|
|
188
433
|
export type GetClusterListResp = {
|
|
189
434
|
items?: string[]
|
|
435
|
+
clusters?: ClusterItem[]
|
|
190
436
|
pagination?: CommonCommon.Pagination
|
|
191
437
|
}
|
|
192
438
|
|
|
439
|
+
export type ClusterItemMetadata = {
|
|
440
|
+
name?: string
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export type ClusterItemStatus = {
|
|
444
|
+
networkMode?: ClusterItemNetworkMode[]
|
|
445
|
+
setting?: ClusterSetting
|
|
446
|
+
clusterStatus?: CommonCommon.ClusterStatus
|
|
447
|
+
workspace?: Workspace
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export type ClusterItem = {
|
|
451
|
+
metadata?: ClusterItemMetadata
|
|
452
|
+
status?: ClusterItemStatus
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
export type Workspace = {
|
|
456
|
+
id?: number
|
|
457
|
+
name?: string
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export type ClusterSettingPlugin = {
|
|
461
|
+
name?: ClusterSettingPluginPluginName
|
|
462
|
+
enabled?: boolean
|
|
463
|
+
intelligentDetection?: boolean
|
|
464
|
+
externalAddress?: string
|
|
465
|
+
setting?: string
|
|
466
|
+
healthy?: boolean
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export type ClusterSetting = {
|
|
470
|
+
plugins?: ClusterSettingPlugin[]
|
|
471
|
+
network?: ClusterSettingPlugin[]
|
|
472
|
+
}
|
|
473
|
+
|
|
193
474
|
export type GetClusterNamespaceListReq = {
|
|
194
475
|
workspaceId?: number
|
|
195
476
|
cluster?: string
|
|
@@ -197,6 +478,7 @@ export type GetClusterNamespaceListReq = {
|
|
|
197
478
|
|
|
198
479
|
export type GetClusterNamespaceListResp = {
|
|
199
480
|
items?: string[]
|
|
481
|
+
disableItems?: string[]
|
|
200
482
|
pagination?: CommonCommon.Pagination
|
|
201
483
|
}
|
|
202
484
|
|
|
@@ -206,34 +488,107 @@ export type GetInsightAgentStatusReq = {
|
|
|
206
488
|
|
|
207
489
|
export type GetInsightAgentStatusResp = {
|
|
208
490
|
status?: GetInsightAgentStatusRespInsightAgentStatus
|
|
491
|
+
clusterStatus?: CommonCommon.ClusterStatus
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export type GetResourceQuotaReq = {
|
|
495
|
+
cluster?: string
|
|
496
|
+
namespace?: string
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
export type GetResourceQuotaRespMetadata = {
|
|
500
|
+
uid?: string
|
|
501
|
+
name?: string
|
|
502
|
+
namespace?: string
|
|
503
|
+
annotations?: {[key: string]: string}
|
|
504
|
+
resourceVersion?: string
|
|
505
|
+
creationTimestamp?: string
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export type GetResourceQuotaRespSpec = {
|
|
509
|
+
hard?: {[key: string]: string}
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
export type GetResourceQuotaRespStatus = {
|
|
513
|
+
hard?: {[key: string]: string}
|
|
514
|
+
used?: {[key: string]: string}
|
|
515
|
+
available?: {[key: string]: string}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export type GetResourceQuotaResp = {
|
|
519
|
+
metadata?: GetResourceQuotaRespMetadata
|
|
520
|
+
spec?: GetResourceQuotaRespSpec
|
|
521
|
+
status?: GetResourceQuotaRespStatus
|
|
209
522
|
}
|
|
210
523
|
|
|
211
524
|
export class Cluster {
|
|
212
525
|
static GetClusterList(req: GetClusterListReq, initReq?: fm.InitReq): Promise<GetClusterListResp> {
|
|
213
|
-
return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/postgresql/
|
|
526
|
+
return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
527
|
+
}
|
|
528
|
+
static GetAllVisibleWorkspaceClusterList(req: GetAllVisibleWorkspaceClusterListReq, initReq?: fm.InitReq): Promise<GetAllVisibleWorkspaceClusterListResp> {
|
|
529
|
+
return fm.fetchReq<GetAllVisibleWorkspaceClusterListReq, GetAllVisibleWorkspaceClusterListResp>(`/apis/mcamel.io/postgresql/v1alpha2/clusters?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
530
|
+
}
|
|
531
|
+
static GetCluster(req: GetClusterReq, initReq?: fm.InitReq): Promise<GetClusterResp> {
|
|
532
|
+
return fm.fetchReq<GetClusterReq, GetClusterResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["workspaceId"]}/clusters/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
533
|
+
}
|
|
534
|
+
static GetClusterHostnetworkPorts(req: GetClusterHostnetworkPortsReq, initReq?: fm.InitReq): Promise<GetClusterHostnetworkPortsResp> {
|
|
535
|
+
return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["workspaceId"]}/hostnetwork-ports?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
214
536
|
}
|
|
215
537
|
static GetClusterNamespaceList(req: GetClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetClusterNamespaceListResp> {
|
|
216
|
-
return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/postgresql/
|
|
538
|
+
return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
|
|
539
|
+
}
|
|
540
|
+
static GetAllVisibleWorkspaceClusterNamespaceList(req: GetAllVisibleWorkspaceClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetAllVisibleWorkspaceClusterNamespaceListResp> {
|
|
541
|
+
return fm.fetchReq<GetAllVisibleWorkspaceClusterNamespaceListReq, GetAllVisibleWorkspaceClusterNamespaceListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
217
542
|
}
|
|
218
543
|
static GetClusterNodePortList(req: GetClusterNodePortListReq, initReq?: fm.InitReq): Promise<GetClusterNodePortListResp> {
|
|
219
|
-
return fm.fetchReq<GetClusterNodePortListReq, GetClusterNodePortListResp>(`/apis/mcamel.io/postgresql/
|
|
544
|
+
return fm.fetchReq<GetClusterNodePortListReq, GetClusterNodePortListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/nodeports?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
220
545
|
}
|
|
221
546
|
static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
|
|
222
|
-
return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/postgresql/
|
|
547
|
+
return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
548
|
+
}
|
|
549
|
+
static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
|
|
550
|
+
return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
223
551
|
}
|
|
224
552
|
static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
|
|
225
|
-
return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/postgresql/
|
|
553
|
+
return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/postgresql/v1alpha2/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
226
554
|
}
|
|
227
555
|
static GetInsightAgentStatus(req: GetInsightAgentStatusReq, initReq?: fm.InitReq): Promise<GetInsightAgentStatusResp> {
|
|
228
|
-
return fm.fetchReq<GetInsightAgentStatusReq, GetInsightAgentStatusResp>(`/apis/mcamel.io/postgresql/
|
|
556
|
+
return fm.fetchReq<GetInsightAgentStatusReq, GetInsightAgentStatusResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/insight/status?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
229
557
|
}
|
|
230
558
|
static GetEventList(req: GetEventListReq, initReq?: fm.InitReq): Promise<GetEventListResp> {
|
|
231
|
-
return fm.fetchReq<GetEventListReq, GetEventListResp>(`/apis/mcamel.io/postgresql/
|
|
559
|
+
return fm.fetchReq<GetEventListReq, GetEventListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/${req["namespace"]}/events?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
232
560
|
}
|
|
233
561
|
static GetAllEventList(req: GetAllEventListReq, initReq?: fm.InitReq): Promise<GetAllEventListResp> {
|
|
234
|
-
return fm.fetchReq<GetAllEventListReq, GetAllEventListResp>(`/apis/mcamel.io/postgresql/
|
|
562
|
+
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"})
|
|
563
|
+
}
|
|
564
|
+
static GetAllEventKindsList(req: GetAllEventKindsListReq, initReq?: fm.InitReq): Promise<GetAllEventKindsListResp> {
|
|
565
|
+
return fm.fetchReq<GetAllEventKindsListReq, GetAllEventKindsListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/all-events-kinds?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
235
566
|
}
|
|
236
567
|
static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
|
|
237
|
-
return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/postgresql/
|
|
568
|
+
return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
569
|
+
}
|
|
570
|
+
static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
|
|
571
|
+
return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
572
|
+
}
|
|
573
|
+
static GetAllVisibleWorkspacePermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
|
|
574
|
+
return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/postgresql/v1alpha2/permissions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
575
|
+
}
|
|
576
|
+
static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
|
|
577
|
+
return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
578
|
+
}
|
|
579
|
+
static InstallFile(req: InstallFileReq, initReq?: fm.InitReq): Promise<InstallFileResp> {
|
|
580
|
+
return fm.fetchReq<InstallFileReq, InstallFileResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/install-file`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
581
|
+
}
|
|
582
|
+
static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
|
|
583
|
+
return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
584
|
+
}
|
|
585
|
+
static GetResourceQuota(req: GetResourceQuotaReq, initReq?: fm.InitReq): Promise<GetResourceQuotaResp> {
|
|
586
|
+
return fm.fetchReq<GetResourceQuotaReq, GetResourceQuotaResp>(`/apis/mcamel.io/postgresql/v1alpha2/${req["cluster"]}/${req["namespace"]}/resourcequota?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
587
|
+
}
|
|
588
|
+
static GetClusterNodeTaintList(req: GetClusterNodeTaintListReq, initReq?: fm.InitReq): Promise<GetClusterNodeTaintListResp> {
|
|
589
|
+
return fm.fetchReq<GetClusterNodeTaintListReq, GetClusterNodeTaintListResp>(`/apis/mcamel.io/postgresql/v1alpha2/clusters/${req["cluster"]}/nodes/taints?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
590
|
+
}
|
|
591
|
+
static GetClusterNodeList(req: GetClusterNodeListReq, initReq?: fm.InitReq): Promise<GetClusterNodeListResp> {
|
|
592
|
+
return fm.fetchReq<GetClusterNodeListReq, GetClusterNodeListResp>(`/apis/mcamel.io/postgresql/v1alpha2/clusters/${req["cluster"]}/nodes?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
238
593
|
}
|
|
239
594
|
}
|
package/common.pb.ts
CHANGED
|
@@ -4,6 +4,27 @@
|
|
|
4
4
|
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
export enum TolerationOperator {
|
|
8
|
+
TOLERATION_OPERATOR_UNSPECIFIED = "TOLERATION_OPERATOR_UNSPECIFIED",
|
|
9
|
+
Exists = "Exists",
|
|
10
|
+
Equal = "Equal",
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum TaintEffect {
|
|
14
|
+
TAINT_EFFECT_UNSPECIFIED = "TAINT_EFFECT_UNSPECIFIED",
|
|
15
|
+
NoSchedule = "NoSchedule",
|
|
16
|
+
NoExecute = "NoExecute",
|
|
17
|
+
PreferNoSchedule = "PreferNoSchedule",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export enum FilterPodStatus {
|
|
21
|
+
FILTER_POD_STATUS_UNSPECIFIED = "FILTER_POD_STATUS_UNSPECIFIED",
|
|
22
|
+
FILTER_POD_STATUS_RUNNING = "FILTER_POD_STATUS_RUNNING",
|
|
23
|
+
FILTER_POD_STATUS_ERROR = "FILTER_POD_STATUS_ERROR",
|
|
24
|
+
FILTER_POD_STATUS_COMPLETED = "FILTER_POD_STATUS_COMPLETED",
|
|
25
|
+
FILTER_POD_STATUS_WAITING = "FILTER_POD_STATUS_WAITING",
|
|
26
|
+
}
|
|
27
|
+
|
|
7
28
|
export enum ExternalTrafficPolicy {
|
|
8
29
|
Cluster = "Cluster",
|
|
9
30
|
Local = "Local",
|
|
@@ -20,6 +41,16 @@ export enum ServiceType {
|
|
|
20
41
|
LoadBalancer = "LoadBalancer",
|
|
21
42
|
}
|
|
22
43
|
|
|
44
|
+
export enum ClusterStatus {
|
|
45
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
46
|
+
Unknown = "Unknown",
|
|
47
|
+
Creating = "Creating",
|
|
48
|
+
Running = "Running",
|
|
49
|
+
Updating = "Updating",
|
|
50
|
+
Deleting = "Deleting",
|
|
51
|
+
Failed = "Failed",
|
|
52
|
+
}
|
|
53
|
+
|
|
23
54
|
export enum PageInfoReqSortDir {
|
|
24
55
|
ASC = "ASC",
|
|
25
56
|
DESC = "DESC",
|
|
@@ -106,9 +137,9 @@ export type LabelSelectorRequirement = {
|
|
|
106
137
|
|
|
107
138
|
export type Toleration = {
|
|
108
139
|
key?: string
|
|
109
|
-
operator?:
|
|
140
|
+
operator?: TolerationOperator
|
|
110
141
|
value?: string
|
|
111
|
-
effect?:
|
|
142
|
+
effect?: TaintEffect
|
|
112
143
|
tolerationSeconds?: string
|
|
113
144
|
}
|
|
114
145
|
|
|
@@ -145,10 +176,17 @@ export type PodCommon = {
|
|
|
145
176
|
cpuLimit?: number
|
|
146
177
|
memoryUsage?: number
|
|
147
178
|
memoryLimit?: number
|
|
179
|
+
pvUsedInGb?: number
|
|
180
|
+
pvAllocatedInGb?: number
|
|
148
181
|
conditions?: PodCommonCondition[]
|
|
149
182
|
containersName?: string[]
|
|
150
183
|
ownerReference?: OwnerReference[]
|
|
151
184
|
initContainersName?: string[]
|
|
185
|
+
initContainersStatuses?: ContainerStatus[]
|
|
186
|
+
containersStatuses?: ContainerStatus[]
|
|
187
|
+
podStatus?: string
|
|
188
|
+
annotations?: {[key: string]: string}
|
|
189
|
+
filterPodStatus?: FilterPodStatus
|
|
152
190
|
}
|
|
153
191
|
|
|
154
192
|
export type OwnerReference = {
|
|
@@ -162,4 +200,53 @@ export type CommonItemStatus = {
|
|
|
162
200
|
serviceAddresses?: string[]
|
|
163
201
|
webManagerAddress?: string
|
|
164
202
|
webLogAddress?: string
|
|
203
|
+
avgPvAllocatedInGb?: number
|
|
204
|
+
avgPvUsedInGb?: number
|
|
205
|
+
cpuUtilization?: number
|
|
206
|
+
memoryUtilization?: number
|
|
207
|
+
clusterStatus?: ClusterStatus
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export type AccessWhitelistInternal = {
|
|
211
|
+
namespace?: string
|
|
212
|
+
podSelector?: {[key: string]: string}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export type AccessWhitelistExternal = {
|
|
216
|
+
cidr?: string
|
|
217
|
+
ip?: string
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export type AccessWhitelist = {
|
|
221
|
+
internals?: AccessWhitelistInternal[]
|
|
222
|
+
externals?: AccessWhitelistExternal[]
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export type ContainerStatus = {
|
|
226
|
+
name?: string
|
|
227
|
+
state?: ContainerState
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export type ContainerState = {
|
|
231
|
+
waiting?: ContainerStateWaiting
|
|
232
|
+
running?: ContainerStateRunning
|
|
233
|
+
terminated?: ContainerStateTerminated
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export type ContainerStateWaiting = {
|
|
237
|
+
reason?: string
|
|
238
|
+
message?: string
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export type ContainerStateRunning = {
|
|
242
|
+
startedAt?: string
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export type ContainerStateTerminated = {
|
|
246
|
+
exitCode?: number
|
|
247
|
+
signal?: number
|
|
248
|
+
reason?: string
|
|
249
|
+
message?: string
|
|
250
|
+
startedAt?: string
|
|
251
|
+
finishedAt?: string
|
|
165
252
|
}
|
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
|
-
|
|
27
|
+
id?: string
|
|
28
|
+
groupName?: string
|
|
29
|
+
groupId?: string
|
|
35
30
|
ruleName?: string
|
|
36
|
-
|
|
31
|
+
ruleId?: string
|
|
37
32
|
clusterName?: string
|
|
38
33
|
namespace?: string
|
|
39
34
|
targetType?: TargetType
|
|
40
|
-
|
|
41
|
-
|
|
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,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/
|
|
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
|
}
|