@daocloud-proto/mcamel-postgresql 0.0.2-6 → 0.0.2-600
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/cluster.pb.ts +273 -0
- package/common.pb.ts +73 -0
- package/insight.pb.ts +8 -12
- package/metric.pb.ts +11 -0
- package/package.json +1 -1
- package/postgresql.pb.ts +322 -11
- package/storage_config.pb.ts +188 -0
- package/template.pb.ts +194 -0
- package/version.pb.ts +7 -0
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,127 @@ 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
|
+
}
|
|
85
|
+
|
|
31
86
|
export enum GetInsightAgentStatusRespInsightAgentStatus {
|
|
32
87
|
NotInstall = "NotInstall",
|
|
33
88
|
Install = "Install",
|
|
34
89
|
}
|
|
35
90
|
|
|
91
|
+
export type GetClusterReq = {
|
|
92
|
+
workspaceId?: number
|
|
93
|
+
name?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type GetClusterResp = {
|
|
97
|
+
cluster?: ClusterItem
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export type InstallFileReq = {
|
|
101
|
+
cluster?: string
|
|
102
|
+
path?: string
|
|
103
|
+
gvr?: InstallFileReqGVR
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export type InstallFileResp = {
|
|
107
|
+
message?: string
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type GetInstallVersionReq = {
|
|
111
|
+
cluster?: string
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export type GetInstallVersionRespSupportVersion = {
|
|
115
|
+
minVersion?: string
|
|
116
|
+
maxVersion?: string
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type GetInstallVersionRespStatus = {
|
|
120
|
+
inRange?: boolean
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type GetInstallVersionResp = {
|
|
124
|
+
clusterVersion?: string
|
|
125
|
+
supportVersion?: GetInstallVersionRespSupportVersion
|
|
126
|
+
status?: GetInstallVersionRespStatus
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export type RestartInstanceReq = {
|
|
130
|
+
workspaceId?: number
|
|
131
|
+
cluster?: string
|
|
132
|
+
namespace?: string
|
|
133
|
+
name?: string
|
|
134
|
+
extra?: string
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export type RestartInstanceResp = {
|
|
138
|
+
message?: string
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type GetPermissionsListReq = {
|
|
142
|
+
workspaceId?: number
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export type GetPermissionsListRespPermissions = {
|
|
146
|
+
getInstance?: boolean
|
|
147
|
+
createInstance?: boolean
|
|
148
|
+
updateInstance?: boolean
|
|
149
|
+
deleteInstance?: boolean
|
|
150
|
+
getMetric?: boolean
|
|
151
|
+
getInstanceLog?: boolean
|
|
152
|
+
getConfig?: boolean
|
|
153
|
+
updateConfig?: boolean
|
|
154
|
+
getBackup?: boolean
|
|
155
|
+
createBackup?: boolean
|
|
156
|
+
updateBackup?: boolean
|
|
157
|
+
deleteBackup?: boolean
|
|
158
|
+
getBackupConf?: boolean
|
|
159
|
+
createBackupConf?: boolean
|
|
160
|
+
updateBackupConf?: boolean
|
|
161
|
+
deleteBackupConf?: boolean
|
|
162
|
+
getTemplate?: boolean
|
|
163
|
+
createTemplate?: boolean
|
|
164
|
+
updateTemplate?: boolean
|
|
165
|
+
deleteTemplate?: boolean
|
|
166
|
+
getUserPassword?: boolean
|
|
167
|
+
exportTemplate?: boolean
|
|
168
|
+
importTemplate?: boolean
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export type GetPermissionsListResp = {
|
|
172
|
+
permissionsBool?: GetPermissionsListRespPermissions
|
|
173
|
+
permissions?: PermissionsType[]
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export type GetAllEventKindsListResp = {
|
|
177
|
+
data?: string[]
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export type GetAllEventKindsListReq = {
|
|
181
|
+
cluster?: string
|
|
182
|
+
}
|
|
183
|
+
|
|
36
184
|
export type GetAllEventListReq = {
|
|
37
185
|
page?: number
|
|
38
186
|
pageSize?: number
|
|
@@ -43,6 +191,7 @@ export type GetAllEventListReq = {
|
|
|
43
191
|
namespace?: string
|
|
44
192
|
name?: string
|
|
45
193
|
eventType?: EventType
|
|
194
|
+
kindName?: string
|
|
46
195
|
}
|
|
47
196
|
|
|
48
197
|
export type GetAllEventListRespItemsSource = {
|
|
@@ -97,8 +246,32 @@ export type GetClusterNodeLabelListRespLabel = {
|
|
|
97
246
|
value?: string[]
|
|
98
247
|
}
|
|
99
248
|
|
|
249
|
+
export type GetClusterNodeLabelListRespNode2Label = {
|
|
250
|
+
nodeName?: string
|
|
251
|
+
label?: GetClusterNodeLabelListRespLabel[]
|
|
252
|
+
}
|
|
253
|
+
|
|
100
254
|
export type GetClusterNodeLabelListResp = {
|
|
101
255
|
items?: GetClusterNodeLabelListRespLabel[]
|
|
256
|
+
items1?: GetClusterNodeLabelListRespNode2Label[]
|
|
257
|
+
pagination?: CommonCommon.Pagination
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export type GetClusterPodLabelListReq = {
|
|
261
|
+
page?: number
|
|
262
|
+
pageSize?: number
|
|
263
|
+
searchKey?: string
|
|
264
|
+
filterNamespace?: string
|
|
265
|
+
cluster?: string
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export type GetClusterPodLabelListRespLabel = {
|
|
269
|
+
key?: string
|
|
270
|
+
value?: string[]
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export type GetClusterPodLabelListResp = {
|
|
274
|
+
items?: GetClusterPodLabelListRespLabel[]
|
|
102
275
|
pagination?: CommonCommon.Pagination
|
|
103
276
|
}
|
|
104
277
|
|
|
@@ -174,6 +347,7 @@ export type GetWorkspaceListReq = {
|
|
|
174
347
|
export type GetWorkspaceListRespItem = {
|
|
175
348
|
workspaceId?: number
|
|
176
349
|
alias?: string
|
|
350
|
+
visible?: boolean
|
|
177
351
|
}
|
|
178
352
|
|
|
179
353
|
export type GetWorkspaceListResp = {
|
|
@@ -181,15 +355,55 @@ export type GetWorkspaceListResp = {
|
|
|
181
355
|
pagination?: CommonCommon.Pagination
|
|
182
356
|
}
|
|
183
357
|
|
|
358
|
+
export type GetClusterHostnetworkPortsReq = {
|
|
359
|
+
workspaceId?: number
|
|
360
|
+
cluster?: string
|
|
361
|
+
}
|
|
362
|
+
|
|
184
363
|
export type GetClusterListReq = {
|
|
185
364
|
workspaceId?: number
|
|
365
|
+
searchKey?: string
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export type GetClusterHostnetworkPortsResp = {
|
|
369
|
+
items?: number[]
|
|
186
370
|
}
|
|
187
371
|
|
|
188
372
|
export type GetClusterListResp = {
|
|
189
373
|
items?: string[]
|
|
374
|
+
clusters?: ClusterItem[]
|
|
190
375
|
pagination?: CommonCommon.Pagination
|
|
191
376
|
}
|
|
192
377
|
|
|
378
|
+
export type ClusterItemMetadata = {
|
|
379
|
+
name?: string
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export type ClusterItemStatus = {
|
|
383
|
+
networkMode?: ClusterItemNetworkMode[]
|
|
384
|
+
setting?: ClusterSetting
|
|
385
|
+
clusterStatus?: CommonCommon.ClusterStatus
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export type ClusterItem = {
|
|
389
|
+
metadata?: ClusterItemMetadata
|
|
390
|
+
status?: ClusterItemStatus
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export type ClusterSettingPlugin = {
|
|
394
|
+
name?: ClusterSettingPluginPluginName
|
|
395
|
+
enabled?: boolean
|
|
396
|
+
intelligentDetection?: boolean
|
|
397
|
+
externalAddress?: string
|
|
398
|
+
setting?: string
|
|
399
|
+
healthy?: boolean
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export type ClusterSetting = {
|
|
403
|
+
plugins?: ClusterSettingPlugin[]
|
|
404
|
+
network?: ClusterSettingPlugin[]
|
|
405
|
+
}
|
|
406
|
+
|
|
193
407
|
export type GetClusterNamespaceListReq = {
|
|
194
408
|
workspaceId?: number
|
|
195
409
|
cluster?: string
|
|
@@ -197,6 +411,7 @@ export type GetClusterNamespaceListReq = {
|
|
|
197
411
|
|
|
198
412
|
export type GetClusterNamespaceListResp = {
|
|
199
413
|
items?: string[]
|
|
414
|
+
disableItems?: string[]
|
|
200
415
|
pagination?: CommonCommon.Pagination
|
|
201
416
|
}
|
|
202
417
|
|
|
@@ -206,12 +421,49 @@ export type GetInsightAgentStatusReq = {
|
|
|
206
421
|
|
|
207
422
|
export type GetInsightAgentStatusResp = {
|
|
208
423
|
status?: GetInsightAgentStatusRespInsightAgentStatus
|
|
424
|
+
clusterStatus?: CommonCommon.ClusterStatus
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
export type GetResourceQuotaReq = {
|
|
428
|
+
cluster?: string
|
|
429
|
+
namespace?: string
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export type GetResourceQuotaRespMetadata = {
|
|
433
|
+
uid?: string
|
|
434
|
+
name?: string
|
|
435
|
+
namespace?: string
|
|
436
|
+
annotations?: {[key: string]: string}
|
|
437
|
+
resourceVersion?: string
|
|
438
|
+
creationTimestamp?: string
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
export type GetResourceQuotaRespSpec = {
|
|
442
|
+
hard?: {[key: string]: string}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export type GetResourceQuotaRespStatus = {
|
|
446
|
+
hard?: {[key: string]: string}
|
|
447
|
+
used?: {[key: string]: string}
|
|
448
|
+
available?: {[key: string]: string}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export type GetResourceQuotaResp = {
|
|
452
|
+
metadata?: GetResourceQuotaRespMetadata
|
|
453
|
+
spec?: GetResourceQuotaRespSpec
|
|
454
|
+
status?: GetResourceQuotaRespStatus
|
|
209
455
|
}
|
|
210
456
|
|
|
211
457
|
export class Cluster {
|
|
212
458
|
static GetClusterList(req: GetClusterListReq, initReq?: fm.InitReq): Promise<GetClusterListResp> {
|
|
213
459
|
return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
214
460
|
}
|
|
461
|
+
static GetCluster(req: GetClusterReq, initReq?: fm.InitReq): Promise<GetClusterResp> {
|
|
462
|
+
return fm.fetchReq<GetClusterReq, GetClusterResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/clusters/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
463
|
+
}
|
|
464
|
+
static GetClusterHostnetworkPorts(req: GetClusterHostnetworkPortsReq, initReq?: fm.InitReq): Promise<GetClusterHostnetworkPortsResp> {
|
|
465
|
+
return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/hostnetwork-ports?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
466
|
+
}
|
|
215
467
|
static GetClusterNamespaceList(req: GetClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetClusterNamespaceListResp> {
|
|
216
468
|
return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
|
|
217
469
|
}
|
|
@@ -221,6 +473,9 @@ export class Cluster {
|
|
|
221
473
|
static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
|
|
222
474
|
return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
223
475
|
}
|
|
476
|
+
static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
|
|
477
|
+
return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
478
|
+
}
|
|
224
479
|
static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
|
|
225
480
|
return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
226
481
|
}
|
|
@@ -233,7 +488,25 @@ export class Cluster {
|
|
|
233
488
|
static GetAllEventList(req: GetAllEventListReq, initReq?: fm.InitReq): Promise<GetAllEventListResp> {
|
|
234
489
|
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"})
|
|
235
490
|
}
|
|
491
|
+
static GetAllEventKindsList(req: GetAllEventKindsListReq, initReq?: fm.InitReq): Promise<GetAllEventKindsListResp> {
|
|
492
|
+
return fm.fetchReq<GetAllEventKindsListReq, GetAllEventKindsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/all-events-kinds?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
493
|
+
}
|
|
236
494
|
static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
|
|
237
495
|
return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
238
496
|
}
|
|
497
|
+
static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
|
|
498
|
+
return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
499
|
+
}
|
|
500
|
+
static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
|
|
501
|
+
return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
502
|
+
}
|
|
503
|
+
static InstallFile(req: InstallFileReq, initReq?: fm.InitReq): Promise<InstallFileResp> {
|
|
504
|
+
return fm.fetchReq<InstallFileReq, InstallFileResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/install-file`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
505
|
+
}
|
|
506
|
+
static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
|
|
507
|
+
return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
508
|
+
}
|
|
509
|
+
static GetResourceQuota(req: GetResourceQuotaReq, initReq?: fm.InitReq): Promise<GetResourceQuotaResp> {
|
|
510
|
+
return fm.fetchReq<GetResourceQuotaReq, GetResourceQuotaResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/${req["namespace"]}/resourcequota?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
511
|
+
}
|
|
239
512
|
}
|
package/common.pb.ts
CHANGED
|
@@ -20,6 +20,16 @@ export enum ServiceType {
|
|
|
20
20
|
LoadBalancer = "LoadBalancer",
|
|
21
21
|
}
|
|
22
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
|
+
|
|
23
33
|
export enum PageInfoReqSortDir {
|
|
24
34
|
ASC = "ASC",
|
|
25
35
|
DESC = "DESC",
|
|
@@ -40,6 +50,14 @@ export enum PodCommonConditionStatus {
|
|
|
40
50
|
PodConditionStatusFalse = "PodConditionStatusFalse",
|
|
41
51
|
}
|
|
42
52
|
|
|
53
|
+
export enum PodCommonFilterPodStatus {
|
|
54
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
55
|
+
RUNNING = "RUNNING",
|
|
56
|
+
ERROR = "ERROR",
|
|
57
|
+
COMPLETED = "COMPLETED",
|
|
58
|
+
WAITING = "WAITING",
|
|
59
|
+
}
|
|
60
|
+
|
|
43
61
|
export type Affinity = {
|
|
44
62
|
nodeAffinity?: NodeAffinity
|
|
45
63
|
podAffinity?: PodAffinity
|
|
@@ -145,10 +163,16 @@ export type PodCommon = {
|
|
|
145
163
|
cpuLimit?: number
|
|
146
164
|
memoryUsage?: number
|
|
147
165
|
memoryLimit?: number
|
|
166
|
+
pvUsedInGb?: number
|
|
167
|
+
pvAllocatedInGb?: number
|
|
148
168
|
conditions?: PodCommonCondition[]
|
|
149
169
|
containersName?: string[]
|
|
150
170
|
ownerReference?: OwnerReference[]
|
|
151
171
|
initContainersName?: string[]
|
|
172
|
+
initContainersStatuses?: ContainerStatus[]
|
|
173
|
+
containersStatuses?: ContainerStatus[]
|
|
174
|
+
podStatus?: string
|
|
175
|
+
annotations?: {[key: string]: string}
|
|
152
176
|
}
|
|
153
177
|
|
|
154
178
|
export type OwnerReference = {
|
|
@@ -162,4 +186,53 @@ export type CommonItemStatus = {
|
|
|
162
186
|
serviceAddresses?: string[]
|
|
163
187
|
webManagerAddress?: string
|
|
164
188
|
webLogAddress?: string
|
|
189
|
+
avgPvAllocatedInGb?: number
|
|
190
|
+
avgPvUsedInGb?: number
|
|
191
|
+
cpuUtilization?: number
|
|
192
|
+
memoryUtilization?: number
|
|
193
|
+
clusterStatus?: ClusterStatus
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export type AccessWhitelistInternal = {
|
|
197
|
+
namespace?: string
|
|
198
|
+
podSelector?: {[key: string]: string}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export type AccessWhitelistExternal = {
|
|
202
|
+
cidr?: string
|
|
203
|
+
ip?: string
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export type AccessWhitelist = {
|
|
207
|
+
internals?: AccessWhitelistInternal[]
|
|
208
|
+
externals?: AccessWhitelistExternal[]
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export type ContainerStatus = {
|
|
212
|
+
name?: string
|
|
213
|
+
state?: ContainerState
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export type ContainerState = {
|
|
217
|
+
waiting?: ContainerStateWaiting
|
|
218
|
+
running?: ContainerStateRunning
|
|
219
|
+
terminated?: ContainerStateTerminated
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export type ContainerStateWaiting = {
|
|
223
|
+
reason?: string
|
|
224
|
+
message?: string
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export type ContainerStateRunning = {
|
|
228
|
+
startedAt?: string
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export type ContainerStateTerminated = {
|
|
232
|
+
exitCode?: number
|
|
233
|
+
signal?: number
|
|
234
|
+
reason?: string
|
|
235
|
+
message?: string
|
|
236
|
+
startedAt?: string
|
|
237
|
+
finishedAt?: string
|
|
165
238
|
}
|
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,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
|
package/package.json
CHANGED
package/postgresql.pb.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as CommonCommon from "./common.pb"
|
|
8
8
|
import * as fm from "./fetch.pb"
|
|
9
|
+
import * as TemplateTemplate from "./template.pb"
|
|
9
10
|
|
|
10
11
|
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
11
12
|
type OneOf<T> =
|
|
@@ -20,6 +21,81 @@ export enum Status {
|
|
|
20
21
|
Failed = "Failed",
|
|
21
22
|
Running = "Running",
|
|
22
23
|
Creating = "Creating",
|
|
24
|
+
Unknown = "Unknown",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export enum GetPostgresqlTopologyRespNodePodStatus {
|
|
28
|
+
Pending = "Pending",
|
|
29
|
+
Running = "Running",
|
|
30
|
+
Succeeded = "Succeeded",
|
|
31
|
+
Failed = "Failed",
|
|
32
|
+
Unknown = "Unknown",
|
|
33
|
+
Terminating = "Terminating",
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export enum GetPostgresqlTopologyRespNodeRole {
|
|
37
|
+
RoleUnknown = "RoleUnknown",
|
|
38
|
+
Primary = "Primary",
|
|
39
|
+
Standby = "Standby",
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export enum GetPostgresqlTopologyRespNodeSyncState {
|
|
43
|
+
SyncStateUnknown = "SyncStateUnknown",
|
|
44
|
+
Sync = "Sync",
|
|
45
|
+
Async = "Async",
|
|
46
|
+
Potential = "Potential",
|
|
47
|
+
Quorum = "Quorum",
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export enum GetPostgresqlTopologyRespNodeState {
|
|
51
|
+
StateUnknown = "StateUnknown",
|
|
52
|
+
Startup = "Startup",
|
|
53
|
+
Catchup = "Catchup",
|
|
54
|
+
Streaming = "Streaming",
|
|
55
|
+
Backup = "Backup",
|
|
56
|
+
Stopping = "Stopping",
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export enum GetPostgresqlS3ConfigListReqSortDir {
|
|
60
|
+
ASC = "ASC",
|
|
61
|
+
DESC = "DESC",
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export enum GetPostgresqlBackupListReqSortDir {
|
|
65
|
+
ASC = "ASC",
|
|
66
|
+
DESC = "DESC",
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus {
|
|
70
|
+
Running = "Running",
|
|
71
|
+
Failed = "Failed",
|
|
72
|
+
Succeeded = "Succeeded",
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType {
|
|
76
|
+
Full = "Full",
|
|
77
|
+
Incremental = "Incremental",
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod {
|
|
81
|
+
Manual = "Manual",
|
|
82
|
+
Auto = "Auto",
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export enum PostgresqlBackupItemStatusStatus {
|
|
86
|
+
Running = "Running",
|
|
87
|
+
Failed = "Failed",
|
|
88
|
+
Succeeded = "Succeeded",
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export enum PostgresqlBackupItemStatusBackupType {
|
|
92
|
+
Full = "Full",
|
|
93
|
+
Incremental = "Incremental",
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export enum PostgresqlBackupItemStatusBackupMethod {
|
|
97
|
+
Manual = "Manual",
|
|
98
|
+
Auto = "Auto",
|
|
23
99
|
}
|
|
24
100
|
|
|
25
101
|
export enum GetPostgresqlListReqSortDir {
|
|
@@ -52,8 +128,8 @@ export enum GetPostgresqlPodListRespPodStatus {
|
|
|
52
128
|
}
|
|
53
129
|
|
|
54
130
|
export enum GetPostgresqlPodListRespPodType {
|
|
55
|
-
|
|
56
|
-
|
|
131
|
+
Primary = "Primary",
|
|
132
|
+
Standby = "Standby",
|
|
57
133
|
PgAdmin = "PgAdmin",
|
|
58
134
|
}
|
|
59
135
|
|
|
@@ -67,6 +143,210 @@ export enum GetPostgresqlConfRespItemsParamType {
|
|
|
67
143
|
conf = "conf",
|
|
68
144
|
}
|
|
69
145
|
|
|
146
|
+
export enum PostgresqlItemStatusRestoreInitialStatus {
|
|
147
|
+
Unknown = "Unknown",
|
|
148
|
+
Running = "Running",
|
|
149
|
+
Failed = "Failed",
|
|
150
|
+
Succeeded = "Succeeded",
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export type GetPostgresqlTopologyReq = {
|
|
154
|
+
cluster?: string
|
|
155
|
+
namespace?: string
|
|
156
|
+
name?: string
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export type GetPostgresqlTopologyRespNode = {
|
|
160
|
+
cluster?: string
|
|
161
|
+
namespace?: string
|
|
162
|
+
podName?: string
|
|
163
|
+
ip?: string
|
|
164
|
+
podStatus?: GetPostgresqlTopologyRespNodePodStatus
|
|
165
|
+
totalContainer?: number
|
|
166
|
+
totalContainerReady?: number
|
|
167
|
+
podCpuRequest?: string
|
|
168
|
+
podMemoryRequest?: string
|
|
169
|
+
podCpuLimit?: string
|
|
170
|
+
podMemoryLimit?: string
|
|
171
|
+
role?: GetPostgresqlTopologyRespNodeRole
|
|
172
|
+
syncState?: GetPostgresqlTopologyRespNodeSyncState
|
|
173
|
+
state?: GetPostgresqlTopologyRespNodeState
|
|
174
|
+
sentLsn?: string
|
|
175
|
+
writeLsn?: string
|
|
176
|
+
flushLsn?: string
|
|
177
|
+
replayLsn?: string
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export type GetPostgresqlTopologyRespEdges = {
|
|
181
|
+
source?: string
|
|
182
|
+
target?: string
|
|
183
|
+
properties?: {[key: string]: string}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export type GetPostgresqlTopologyResp = {
|
|
187
|
+
nodes?: GetPostgresqlTopologyRespNode[]
|
|
188
|
+
edges?: GetPostgresqlTopologyRespEdges[]
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export type CreatePostgresqlRestoreReq = {
|
|
192
|
+
cluster?: string
|
|
193
|
+
namespace?: string
|
|
194
|
+
name?: string
|
|
195
|
+
backupName?: string
|
|
196
|
+
targetPostgresqlName?: string
|
|
197
|
+
targetPostgresqlNamespace?: string
|
|
198
|
+
targetPostgresqlCluster?: string
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export type CreatePostgresqlRestoreResp = {
|
|
202
|
+
message?: string
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export type DeletePostgresqlBackupReq = {
|
|
206
|
+
cluster?: string
|
|
207
|
+
namespace?: string
|
|
208
|
+
name?: string
|
|
209
|
+
backupName?: string
|
|
210
|
+
removeRemoteBackup?: boolean
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export type DeletePostgresqlBackupResp = {
|
|
214
|
+
message?: string
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export type CreateBucketExistCheckingReq = {
|
|
218
|
+
endpoint?: string
|
|
219
|
+
accessKey?: string
|
|
220
|
+
secretKey?: string
|
|
221
|
+
bucket?: string
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export type CreateBucketExistCheckingResp = {
|
|
225
|
+
message?: string
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export type UpdatePostgresqlS3ConfigReq = {
|
|
229
|
+
cluster?: string
|
|
230
|
+
namespace?: string
|
|
231
|
+
name?: string
|
|
232
|
+
description?: string
|
|
233
|
+
endpoint?: string
|
|
234
|
+
accessKey?: string
|
|
235
|
+
secretKey?: string
|
|
236
|
+
bucket?: string
|
|
237
|
+
retentionTime?: string
|
|
238
|
+
provider?: string
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export type UpdatePostgresqlS3ConfigResp = {
|
|
242
|
+
message?: string
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export type GetPostgresqlS3ConfigListReq = {
|
|
246
|
+
page?: number
|
|
247
|
+
pageSize?: number
|
|
248
|
+
sortDir?: GetPostgresqlS3ConfigListReqSortDir
|
|
249
|
+
sortBy?: string
|
|
250
|
+
searchKey?: string
|
|
251
|
+
workspaceId?: number
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus = {
|
|
255
|
+
createTimestamp?: string
|
|
256
|
+
updateTimestamp?: string
|
|
257
|
+
backupPath?: string
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems = {
|
|
261
|
+
spec?: UpdatePostgresqlS3ConfigReq
|
|
262
|
+
status?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export type GetPostgresqlS3ConfigListResp = {
|
|
266
|
+
items?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems[]
|
|
267
|
+
pagination?: CommonCommon.Pagination
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export type UpdatePostgresqlBackupConfigReq = {
|
|
271
|
+
cluster?: string
|
|
272
|
+
namespace?: string
|
|
273
|
+
name?: string
|
|
274
|
+
isOpenAutoBackup?: boolean
|
|
275
|
+
backupSchedule?: string
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export type UpdatePostgresqlBackupConfigResp = {
|
|
279
|
+
message?: string
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export type GetPostgresqlBackupListReq = {
|
|
283
|
+
page?: number
|
|
284
|
+
pageSize?: number
|
|
285
|
+
sortDir?: GetPostgresqlBackupListReqSortDir
|
|
286
|
+
sortBy?: string
|
|
287
|
+
searchKey?: string
|
|
288
|
+
cluster?: string
|
|
289
|
+
namespace?: string
|
|
290
|
+
name?: string
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemMetadata = {
|
|
294
|
+
creationTimestamp?: string
|
|
295
|
+
name?: string
|
|
296
|
+
namespace?: string
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition = {
|
|
300
|
+
type?: string
|
|
301
|
+
status?: string
|
|
302
|
+
reason?: string
|
|
303
|
+
message?: string
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemStatus = {
|
|
307
|
+
completionTimestamp?: string
|
|
308
|
+
startTime?: string
|
|
309
|
+
active?: number
|
|
310
|
+
succeeded?: number
|
|
311
|
+
failed?: number
|
|
312
|
+
conditions?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition[]
|
|
313
|
+
status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus
|
|
314
|
+
backupType?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType
|
|
315
|
+
backupMethod?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod
|
|
316
|
+
storePath?: string
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItem = {
|
|
320
|
+
metadata?: GetPostgresqlBackupListRespPostgresqlBackupItemMetadata
|
|
321
|
+
spec?: CreatePostgresqlBackupReq
|
|
322
|
+
status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatus
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export type GetPostgresqlBackupListResp = {
|
|
326
|
+
items?: GetPostgresqlBackupListRespPostgresqlBackupItem[]
|
|
327
|
+
pagination?: CommonCommon.Pagination
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export type CreatePostgresqlBackupReq = {
|
|
331
|
+
cluster?: string
|
|
332
|
+
namespace?: string
|
|
333
|
+
name?: string
|
|
334
|
+
backupName?: string
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export type CreatePostgresqlBackupResp = {
|
|
338
|
+
message?: string
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export type PostgresqlBackupItemStatus = {
|
|
342
|
+
status?: PostgresqlBackupItemStatusStatus
|
|
343
|
+
message?: string
|
|
344
|
+
backupUrl?: string
|
|
345
|
+
backupType?: PostgresqlBackupItemStatusBackupType
|
|
346
|
+
backupMethod?: PostgresqlBackupItemStatusBackupMethod
|
|
347
|
+
completionTimestamp?: string
|
|
348
|
+
}
|
|
349
|
+
|
|
70
350
|
export type GetPostgresqlUsersReq = {
|
|
71
351
|
cluster?: string
|
|
72
352
|
namespace?: string
|
|
@@ -89,6 +369,8 @@ export type GetPostgresqlListReq = {
|
|
|
89
369
|
sortBy?: string
|
|
90
370
|
searchKey?: string
|
|
91
371
|
workspaceId?: number
|
|
372
|
+
filterCluster?: string
|
|
373
|
+
filterNamespace?: string
|
|
92
374
|
}
|
|
93
375
|
|
|
94
376
|
export type GetPostgresqlConfReq = {
|
|
@@ -136,6 +418,7 @@ export type CreatePostgresqlReq = {
|
|
|
136
418
|
memoryRequest?: string
|
|
137
419
|
memoryLimit?: string
|
|
138
420
|
conf?: string
|
|
421
|
+
confTemplateName?: string
|
|
139
422
|
isOpenPgAdmin?: boolean
|
|
140
423
|
pgAdminServiceType?: CommonCommon.ServiceType
|
|
141
424
|
pgAdminNodePort?: number
|
|
@@ -147,6 +430,8 @@ export type CreatePostgresqlReq = {
|
|
|
147
430
|
pgAdminDefaultEmail?: string
|
|
148
431
|
pgAdminDefaultPassword?: string
|
|
149
432
|
affinity?: CommonCommon.Affinity
|
|
433
|
+
backupConfig?: UpdatePostgresqlBackupConfigReq
|
|
434
|
+
accessWhitelist?: CommonCommon.AccessWhitelist
|
|
150
435
|
externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
|
|
151
436
|
lbTyp?: CommonCommon.LBTyp
|
|
152
437
|
lbPoolName?: string
|
|
@@ -162,6 +447,8 @@ export type UpdatePostgresqlConfReq = {
|
|
|
162
447
|
namespace?: string
|
|
163
448
|
name?: string
|
|
164
449
|
conf?: string
|
|
450
|
+
confItems?: TemplateTemplate.TemplateConfigItem[]
|
|
451
|
+
reloadFromConfTemplateName?: string
|
|
165
452
|
}
|
|
166
453
|
|
|
167
454
|
export type UpdatePostgresqlParamsResp = {
|
|
@@ -176,13 +463,6 @@ export type GetPostgresqlParamRespSelectDataStringValue = {
|
|
|
176
463
|
value?: string
|
|
177
464
|
}
|
|
178
465
|
|
|
179
|
-
export type GetPostgresqlParamRespSelectDataResourceValue = {
|
|
180
|
-
cpuRequest?: string
|
|
181
|
-
cpuLimit?: string
|
|
182
|
-
memoryRequest?: string
|
|
183
|
-
memoryLimit?: string
|
|
184
|
-
}
|
|
185
|
-
|
|
186
466
|
export type GetPostgresqlParamRespSelectDataIntValue = {
|
|
187
467
|
value?: number
|
|
188
468
|
}
|
|
@@ -197,7 +477,7 @@ type BaseGetPostgresqlParamRespSelectData = {
|
|
|
197
477
|
}
|
|
198
478
|
|
|
199
479
|
export type GetPostgresqlParamRespSelectData = BaseGetPostgresqlParamRespSelectData
|
|
200
|
-
& OneOf<{ sValue: GetPostgresqlParamRespSelectDataStringValue;
|
|
480
|
+
& OneOf<{ sValue: GetPostgresqlParamRespSelectDataStringValue; iValue: GetPostgresqlParamRespSelectDataIntValue; scValue: GetPostgresqlParamRespSelectDataStorageClassValue }>
|
|
201
481
|
|
|
202
482
|
export type GetPostgresqlParamRespSelect = {
|
|
203
483
|
selectType?: GetPostgresqlParamRespSelectSelectType
|
|
@@ -208,7 +488,6 @@ export type GetPostgresqlParamResp = {
|
|
|
208
488
|
version?: GetPostgresqlParamRespSelect
|
|
209
489
|
conf?: GetPostgresqlParamRespSelect
|
|
210
490
|
replicas?: GetPostgresqlParamRespSelect
|
|
211
|
-
resource?: GetPostgresqlParamRespSelect
|
|
212
491
|
storage?: GetPostgresqlParamRespSelect
|
|
213
492
|
}
|
|
214
493
|
|
|
@@ -288,6 +567,8 @@ export type GetPostgresqlGrafanaAddrReq = {
|
|
|
288
567
|
cluster?: string
|
|
289
568
|
namespace?: string
|
|
290
569
|
name?: string
|
|
570
|
+
from?: string
|
|
571
|
+
to?: string
|
|
291
572
|
}
|
|
292
573
|
|
|
293
574
|
export type GetPostgresqlGrafanaAddrResp = {
|
|
@@ -327,6 +608,8 @@ export type PostgresqlItemStatus = {
|
|
|
327
608
|
clusterIPs?: string[]
|
|
328
609
|
avgReplicationLagInBytes?: string
|
|
329
610
|
common?: CommonCommon.CommonItemStatus
|
|
611
|
+
isControl?: boolean
|
|
612
|
+
restoreInitialStatus?: PostgresqlItemStatusRestoreInitialStatus
|
|
330
613
|
}
|
|
331
614
|
|
|
332
615
|
export type PostgresqlItemMetadata = {
|
|
@@ -334,6 +617,7 @@ export type PostgresqlItemMetadata = {
|
|
|
334
617
|
creationTimestamp?: string
|
|
335
618
|
name?: string
|
|
336
619
|
namespace?: string
|
|
620
|
+
uid?: string
|
|
337
621
|
}
|
|
338
622
|
|
|
339
623
|
export type PostgresqlItem = {
|
|
@@ -384,4 +668,31 @@ export class Postgresql {
|
|
|
384
668
|
static GetPostgresqlUsers(req: GetPostgresqlUsersReq, initReq?: fm.InitReq): Promise<GetPostgresqlUsersResp> {
|
|
385
669
|
return fm.fetchReq<GetPostgresqlUsersReq, GetPostgresqlUsersResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/users?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
386
670
|
}
|
|
671
|
+
static GetPostgresqlBackupList(req: GetPostgresqlBackupListReq, initReq?: fm.InitReq): Promise<GetPostgresqlBackupListResp> {
|
|
672
|
+
return fm.fetchReq<GetPostgresqlBackupListReq, GetPostgresqlBackupListResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backups?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
673
|
+
}
|
|
674
|
+
static CreatePostgresqlBackup(req: CreatePostgresqlBackupReq, initReq?: fm.InitReq): Promise<CreatePostgresqlBackupResp> {
|
|
675
|
+
return fm.fetchReq<CreatePostgresqlBackupReq, CreatePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
676
|
+
}
|
|
677
|
+
static CreatePostgresqlRestore(req: CreatePostgresqlRestoreReq, initReq?: fm.InitReq): Promise<CreatePostgresqlRestoreResp> {
|
|
678
|
+
return fm.fetchReq<CreatePostgresqlRestoreReq, CreatePostgresqlRestoreResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/restore`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
679
|
+
}
|
|
680
|
+
static DeletePostgresqlBackup(req: DeletePostgresqlBackupReq, initReq?: fm.InitReq): Promise<DeletePostgresqlBackupResp> {
|
|
681
|
+
return fm.fetchReq<DeletePostgresqlBackupReq, DeletePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/backups/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/${req["backupName"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req)})
|
|
682
|
+
}
|
|
683
|
+
static UpdatePostgresqlBackupConfig(req: UpdatePostgresqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlBackupConfigResp> {
|
|
684
|
+
return fm.fetchReq<UpdatePostgresqlBackupConfigReq, UpdatePostgresqlBackupConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
685
|
+
}
|
|
686
|
+
static GetPostgresqlS3ConfigList(req: GetPostgresqlS3ConfigListReq, initReq?: fm.InitReq): Promise<GetPostgresqlS3ConfigListResp> {
|
|
687
|
+
return fm.fetchReq<GetPostgresqlS3ConfigListReq, GetPostgresqlS3ConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/s3/configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
688
|
+
}
|
|
689
|
+
static UpdatePostgresqlS3Config(req: UpdatePostgresqlS3ConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlS3ConfigResp> {
|
|
690
|
+
return fm.fetchReq<UpdatePostgresqlS3ConfigReq, UpdatePostgresqlS3ConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/s3/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
691
|
+
}
|
|
692
|
+
static CreateBucketExistChecking(req: CreateBucketExistCheckingReq, initReq?: fm.InitReq): Promise<CreateBucketExistCheckingResp> {
|
|
693
|
+
return fm.fetchReq<CreateBucketExistCheckingReq, CreateBucketExistCheckingResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/s3/config/checking`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
694
|
+
}
|
|
695
|
+
static GetPostgresqlTopology(req: GetPostgresqlTopologyReq, initReq?: fm.InitReq): Promise<GetPostgresqlTopologyResp> {
|
|
696
|
+
return fm.fetchReq<GetPostgresqlTopologyReq, GetPostgresqlTopologyResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/topology?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
697
|
+
}
|
|
387
698
|
}
|
|
@@ -0,0 +1,188 @@
|
|
|
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 CommonCommon from "./common.pb"
|
|
8
|
+
import * as fm from "./fetch.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);
|
|
18
|
+
|
|
19
|
+
export enum GetStorageConfigParamRespSelectSelectType {
|
|
20
|
+
Single = "Single",
|
|
21
|
+
Multiple = "Multiple",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export enum GetStorageConfigConsumersRespStorageConfigConsumerType {
|
|
25
|
+
STORAGE_CONFIG_CONSUMER_TYPE_UNSPECIFIED = "STORAGE_CONFIG_CONSUMER_TYPE_UNSPECIFIED",
|
|
26
|
+
STORAGE_CONFIG_CONSUMER_TYPE_MYSQL = "STORAGE_CONFIG_CONSUMER_TYPE_MYSQL",
|
|
27
|
+
STORAGE_CONFIG_CONSUMER_TYPE_REDIS = "STORAGE_CONFIG_CONSUMER_TYPE_REDIS",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export enum GetStorageConfigListReqSortDir {
|
|
31
|
+
ASC = "ASC",
|
|
32
|
+
DESC = "DESC",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type GetStorageConfigParamReq = {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type GetStorageConfigParamRespSelectDataStringValue = {
|
|
39
|
+
value?: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type GetStorageConfigParamRespSelectDataIntValue = {
|
|
43
|
+
value?: number
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
type BaseGetStorageConfigParamRespSelectData = {
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type GetStorageConfigParamRespSelectData = BaseGetStorageConfigParamRespSelectData
|
|
51
|
+
& OneOf<{ sValue: GetStorageConfigParamRespSelectDataStringValue; iValue: GetStorageConfigParamRespSelectDataIntValue }>
|
|
52
|
+
|
|
53
|
+
export type GetStorageConfigParamRespSelect = {
|
|
54
|
+
selectType?: GetStorageConfigParamRespSelectSelectType
|
|
55
|
+
data?: GetStorageConfigParamRespSelectData[]
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type GetStorageConfigParamResp = {
|
|
59
|
+
storageType?: GetStorageConfigParamRespSelect
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type CreateStorageConfigBucketCheckJobReq = {
|
|
63
|
+
storageType?: string
|
|
64
|
+
endpoint?: string
|
|
65
|
+
accessKey?: string
|
|
66
|
+
secretKey?: string
|
|
67
|
+
bucket?: string
|
|
68
|
+
cluster?: string
|
|
69
|
+
namespace?: string
|
|
70
|
+
name?: string
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export type CreateStorageConfigBucketCheckJobResp = {
|
|
74
|
+
message?: string
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type CreateStorageConfigReq = {
|
|
78
|
+
workspaceId?: number
|
|
79
|
+
cluster?: string
|
|
80
|
+
namespace?: string
|
|
81
|
+
name?: string
|
|
82
|
+
storageType?: string
|
|
83
|
+
accessKey?: string
|
|
84
|
+
secretKey?: string
|
|
85
|
+
bucket?: string
|
|
86
|
+
endpoint?: string
|
|
87
|
+
minioCluster?: string
|
|
88
|
+
minioNamespace?: string
|
|
89
|
+
minioName?: string
|
|
90
|
+
description?: string
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export type CreateStorageConfigResp = {
|
|
94
|
+
message?: string
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type GetStorageConfigConsumersReq = {
|
|
98
|
+
workspaceId?: number
|
|
99
|
+
name?: string
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export type GetStorageConfigConsumersRespConsumer = {
|
|
103
|
+
type?: GetStorageConfigConsumersRespStorageConfigConsumerType
|
|
104
|
+
cluster?: string
|
|
105
|
+
namespace?: string
|
|
106
|
+
name?: string
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type GetStorageConfigConsumersResp = {
|
|
110
|
+
consumers?: GetStorageConfigConsumersRespConsumer[]
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export type DeleteStorageConfigReq = {
|
|
114
|
+
workspaceId?: number
|
|
115
|
+
name?: string
|
|
116
|
+
cluster?: string
|
|
117
|
+
namespace?: string
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export type DeleteStorageConfigResp = {
|
|
121
|
+
message?: string
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export type UpdateStorageConfigResp = {
|
|
125
|
+
message?: string
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export type StorageConfigItemStorageConfigStatus = {
|
|
129
|
+
lastUpdateTimestamp?: string
|
|
130
|
+
createTimestamp?: string
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export type StorageConfigItem = {
|
|
134
|
+
spec?: CreateStorageConfigReq
|
|
135
|
+
status?: StorageConfigItemStorageConfigStatus
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export type GetStorageConfigReq = {
|
|
139
|
+
workspaceId?: number
|
|
140
|
+
name?: string
|
|
141
|
+
namespace?: string
|
|
142
|
+
cluster?: string
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export type GetStorageConfigResp = {
|
|
146
|
+
item?: StorageConfigItem
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export type GetStorageConfigListReq = {
|
|
150
|
+
page?: number
|
|
151
|
+
pageSize?: number
|
|
152
|
+
sortDir?: GetStorageConfigListReqSortDir
|
|
153
|
+
sortBy?: string
|
|
154
|
+
searchKey?: string
|
|
155
|
+
workspaceId?: number
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export type GetStorageConfigListResp = {
|
|
159
|
+
items?: StorageConfigItem[]
|
|
160
|
+
pagination?: CommonCommon.Pagination
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export class StorageConfig {
|
|
164
|
+
static GetStorageConfigParam(req: GetStorageConfigParamReq, initReq?: fm.InitReq): Promise<GetStorageConfigParamResp> {
|
|
165
|
+
return fm.fetchReq<GetStorageConfigParamReq, GetStorageConfigParamResp>(`/apis/mcamel.io/postgresql/v1alpha1/storage-config/param?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
166
|
+
}
|
|
167
|
+
static CreateStorageConfigBucketCheckJob(req: CreateStorageConfigBucketCheckJobReq, initReq?: fm.InitReq): Promise<CreateStorageConfigBucketCheckJobResp> {
|
|
168
|
+
return fm.fetchReq<CreateStorageConfigBucketCheckJobReq, CreateStorageConfigBucketCheckJobResp>(`/apis/mcamel.io/postgresql/v1alpha1/storage-config/bucket/check-job`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
169
|
+
}
|
|
170
|
+
static CreateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<CreateStorageConfigResp> {
|
|
171
|
+
return fm.fetchReq<CreateStorageConfigReq, CreateStorageConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/storage-config`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
172
|
+
}
|
|
173
|
+
static GetStorageConfigConsumers(req: GetStorageConfigConsumersReq, initReq?: fm.InitReq): Promise<GetStorageConfigConsumersResp> {
|
|
174
|
+
return fm.fetchReq<GetStorageConfigConsumersReq, GetStorageConfigConsumersResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}/consumers?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
175
|
+
}
|
|
176
|
+
static DeleteStorageConfig(req: DeleteStorageConfigReq, initReq?: fm.InitReq): Promise<DeleteStorageConfigResp> {
|
|
177
|
+
return fm.fetchReq<DeleteStorageConfigReq, DeleteStorageConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/storage-config/${req["cluster"]}/${req["namespace"]}/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
178
|
+
}
|
|
179
|
+
static UpdateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<UpdateStorageConfigResp> {
|
|
180
|
+
return fm.fetchReq<CreateStorageConfigReq, UpdateStorageConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
181
|
+
}
|
|
182
|
+
static GetStorageConfig(req: GetStorageConfigReq, initReq?: fm.InitReq): Promise<GetStorageConfigResp> {
|
|
183
|
+
return fm.fetchReq<GetStorageConfigReq, GetStorageConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
184
|
+
}
|
|
185
|
+
static GetStorageConfigList(req: GetStorageConfigListReq, initReq?: fm.InitReq): Promise<GetStorageConfigListResp> {
|
|
186
|
+
return fm.fetchReq<GetStorageConfigListReq, GetStorageConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/storage-configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
187
|
+
}
|
|
188
|
+
}
|
package/template.pb.ts
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
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 CommonCommon from "./common.pb"
|
|
8
|
+
import * as fm from "./fetch.pb"
|
|
9
|
+
|
|
10
|
+
export enum TemplateInstanceType {
|
|
11
|
+
MysqlMasterReplica = "MysqlMasterReplica",
|
|
12
|
+
RedisStandalone = "RedisStandalone",
|
|
13
|
+
RedisFailover = "RedisFailover",
|
|
14
|
+
RedisCluster = "RedisCluster",
|
|
15
|
+
KafkaConfig = "KafkaConfig",
|
|
16
|
+
MysqlMgrConfig = "MysqlMgrConfig",
|
|
17
|
+
MongodbConfig = "MongodbConfig",
|
|
18
|
+
PostgresqlConfig = "PostgresqlConfig",
|
|
19
|
+
RabbitmqConfig = "RabbitmqConfig",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export enum GetTemplateConfigReqSortDir {
|
|
23
|
+
ASC = "ASC",
|
|
24
|
+
DESC = "DESC",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export enum GetTemplateConfigListReqSortDir {
|
|
28
|
+
ASC = "ASC",
|
|
29
|
+
DESC = "DESC",
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export enum TemplateConfigItemValueType {
|
|
33
|
+
String = "String",
|
|
34
|
+
SingleSelection = "SingleSelection",
|
|
35
|
+
MultiString = "MultiString",
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type UpdateTemplateConfigToItemReq = {
|
|
39
|
+
workspaceId?: number
|
|
40
|
+
conf?: string
|
|
41
|
+
version?: string
|
|
42
|
+
templateInstanceType?: TemplateInstanceType
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type UpdateTemplateConfigToItemResp = {
|
|
46
|
+
items?: TemplateConfigItem[]
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type GetTemplateConfigVersionsReq = {
|
|
50
|
+
workspaceId?: number
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type GetTemplateConfigVersionsResp = {
|
|
54
|
+
versions?: string[]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type GetTemplateConfigStringResp = {
|
|
58
|
+
conf?: string
|
|
59
|
+
fileName?: string
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type DeleteTemplateReq = {
|
|
63
|
+
workspaceId?: number
|
|
64
|
+
name?: string
|
|
65
|
+
version?: string
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type DeleteTemplateConfigResp = {
|
|
69
|
+
message?: string
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export type CreateOrUpdateTemplateConfigResp = {
|
|
73
|
+
message?: string
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type GetTemplateConfigReq = {
|
|
77
|
+
page?: number
|
|
78
|
+
pageSize?: number
|
|
79
|
+
sortDir?: GetTemplateConfigReqSortDir
|
|
80
|
+
sortBy?: string
|
|
81
|
+
searchKey?: string
|
|
82
|
+
workspaceId?: number
|
|
83
|
+
name?: string
|
|
84
|
+
version?: string
|
|
85
|
+
templateType?: string
|
|
86
|
+
type?: string
|
|
87
|
+
createTimestamp?: string
|
|
88
|
+
templateInstanceType?: TemplateInstanceType
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type GetTemplateConfigStringReq = {
|
|
92
|
+
workspaceId?: number
|
|
93
|
+
name?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type CreateTemplateConfigResp = {
|
|
97
|
+
message?: string
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export type UpdateTemplateConfigResp = {
|
|
101
|
+
message?: string
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type CreateTemplateConfigReq = {
|
|
105
|
+
workspaceId?: number
|
|
106
|
+
targetName?: string
|
|
107
|
+
targetVersion?: string
|
|
108
|
+
targetType?: string
|
|
109
|
+
targetTemplateType?: string
|
|
110
|
+
targetConf?: string
|
|
111
|
+
fromTemplateName?: string
|
|
112
|
+
targetTemplateInstanceType?: TemplateInstanceType
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export type UpdateTemplateConfigReq = {
|
|
116
|
+
workspaceId?: number
|
|
117
|
+
name?: string
|
|
118
|
+
version?: string
|
|
119
|
+
type?: string
|
|
120
|
+
templateType?: string
|
|
121
|
+
items?: TemplateConfigItem[]
|
|
122
|
+
conf?: string
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export type GetTemplateConfigResp = {
|
|
126
|
+
data?: UpdateTemplateConfigReq
|
|
127
|
+
pagination?: CommonCommon.Pagination
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type GetTemplateConfigListReq = {
|
|
131
|
+
page?: number
|
|
132
|
+
pageSize?: number
|
|
133
|
+
sortDir?: GetTemplateConfigListReqSortDir
|
|
134
|
+
sortBy?: string
|
|
135
|
+
searchKey?: string
|
|
136
|
+
workspaceId?: number
|
|
137
|
+
version?: string
|
|
138
|
+
templateInstanceType?: TemplateInstanceType
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type TemplateConfigItem = {
|
|
142
|
+
name?: string
|
|
143
|
+
default?: string
|
|
144
|
+
current?: string
|
|
145
|
+
value?: string
|
|
146
|
+
isNeedRestart?: boolean
|
|
147
|
+
valueType?: TemplateConfigItemValueType
|
|
148
|
+
valueRemarksZh?: string
|
|
149
|
+
valueRemarksEn?: string
|
|
150
|
+
updateTimestamp?: string
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export type GetTemplateConfigListResp = {
|
|
154
|
+
items?: GetTemplateConfigReq[]
|
|
155
|
+
pagination?: CommonCommon.Pagination
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export type GetTemplateInstanceTypeListReq = {
|
|
159
|
+
workspaceId?: number
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export type GetTemplateInstanceTypeListResp = {
|
|
163
|
+
type?: TemplateInstanceType[]
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export class Template {
|
|
167
|
+
static GetTemplateConfigList(req: GetTemplateConfigListReq, initReq?: fm.InitReq): Promise<GetTemplateConfigListResp> {
|
|
168
|
+
return fm.fetchReq<GetTemplateConfigListReq, GetTemplateConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
169
|
+
}
|
|
170
|
+
static GetTemplateInstanceTypeList(req: GetTemplateInstanceTypeListReq, initReq?: fm.InitReq): Promise<GetTemplateInstanceTypeListResp> {
|
|
171
|
+
return fm.fetchReq<GetTemplateInstanceTypeListReq, GetTemplateInstanceTypeListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_instance_type?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
172
|
+
}
|
|
173
|
+
static GetTemplateConfig(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigResp> {
|
|
174
|
+
return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
175
|
+
}
|
|
176
|
+
static DeleteTemplateConfig(req: DeleteTemplateReq, initReq?: fm.InitReq): Promise<DeleteTemplateConfigResp> {
|
|
177
|
+
return fm.fetchReq<DeleteTemplateReq, DeleteTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/${req["version"]}`, {...initReq, method: "DELETE"})
|
|
178
|
+
}
|
|
179
|
+
static CreateTemplateConfig(req: CreateTemplateConfigReq, initReq?: fm.InitReq): Promise<CreateTemplateConfigResp> {
|
|
180
|
+
return fm.fetchReq<CreateTemplateConfigReq, CreateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
181
|
+
}
|
|
182
|
+
static UpdateTemplateConfig(req: UpdateTemplateConfigReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigResp> {
|
|
183
|
+
return fm.fetchReq<UpdateTemplateConfigReq, UpdateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
184
|
+
}
|
|
185
|
+
static GetTemplateConfigString(req: GetTemplateConfigStringReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
|
|
186
|
+
return fm.fetchReq<GetTemplateConfigStringReq, GetTemplateConfigStringResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/to_string?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
187
|
+
}
|
|
188
|
+
static UpdateTemplateConfigToItem(req: UpdateTemplateConfigToItemReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigToItemResp> {
|
|
189
|
+
return fm.fetchReq<UpdateTemplateConfigToItemReq, UpdateTemplateConfigToItemResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/to_template`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
190
|
+
}
|
|
191
|
+
static GetTemplateConfigVersions(req: GetTemplateConfigVersionsReq, initReq?: fm.InitReq): Promise<GetTemplateConfigVersionsResp> {
|
|
192
|
+
return fm.fetchReq<GetTemplateConfigVersionsReq, GetTemplateConfigVersionsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/versions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
193
|
+
}
|
|
194
|
+
}
|
package/version.pb.ts
CHANGED
|
@@ -17,6 +17,10 @@ export type GetVersionReply = {
|
|
|
17
17
|
buildTime?: string
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
export type HealthzReply = {
|
|
21
|
+
message?: string
|
|
22
|
+
}
|
|
23
|
+
|
|
20
24
|
export type Empty = {
|
|
21
25
|
}
|
|
22
26
|
|
|
@@ -24,4 +28,7 @@ export class Version {
|
|
|
24
28
|
static Get(req: Empty, initReq?: fm.InitReq): Promise<GetVersionReply> {
|
|
25
29
|
return fm.fetchReq<Empty, GetVersionReply>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/version?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
26
30
|
}
|
|
31
|
+
static Healthz(req: Empty, initReq?: fm.InitReq): Promise<HealthzReply> {
|
|
32
|
+
return fm.fetchReq<Empty, HealthzReply>(`/healthz?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
33
|
+
}
|
|
27
34
|
}
|