@daocloud-proto/mcamel-postgresql 0.0.2-46 → 0.0.2-462
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 +212 -0
- package/common.pb.ts +61 -0
- package/metric.pb.ts +11 -0
- package/package.json +1 -1
- package/postgresql.pb.ts +286 -9
- package/storage_config.pb.ts +188 -0
- package/template.pb.ts +189 -0
- package/version.pb.ts +7 -0
package/cluster.pb.ts
CHANGED
|
@@ -7,12 +7,42 @@
|
|
|
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
|
+
}
|
|
34
|
+
|
|
10
35
|
export enum EventType {
|
|
11
36
|
EVENT_TYPE_UNSPECIFIED = "EVENT_TYPE_UNSPECIFIED",
|
|
12
37
|
Normal = "Normal",
|
|
13
38
|
Warning = "Warning",
|
|
14
39
|
}
|
|
15
40
|
|
|
41
|
+
export enum InstallFileReqGVR {
|
|
42
|
+
None = "None",
|
|
43
|
+
CustomResourceDefinition = "CustomResourceDefinition",
|
|
44
|
+
}
|
|
45
|
+
|
|
16
46
|
export enum GetAllEventListReqSortDir {
|
|
17
47
|
ASC = "ASC",
|
|
18
48
|
DESC = "DESC",
|
|
@@ -28,11 +58,91 @@ export enum GetWorkspaceListReqSortDir {
|
|
|
28
58
|
DESC = "DESC",
|
|
29
59
|
}
|
|
30
60
|
|
|
61
|
+
export enum ClusterItemNetworkMode {
|
|
62
|
+
Unknown = "Unknown",
|
|
63
|
+
Flannel = "Flannel",
|
|
64
|
+
Calico = "Calico",
|
|
65
|
+
}
|
|
66
|
+
|
|
31
67
|
export enum GetInsightAgentStatusRespInsightAgentStatus {
|
|
32
68
|
NotInstall = "NotInstall",
|
|
33
69
|
Install = "Install",
|
|
34
70
|
}
|
|
35
71
|
|
|
72
|
+
export type InstallFileReq = {
|
|
73
|
+
cluster?: string
|
|
74
|
+
path?: string
|
|
75
|
+
gvr?: InstallFileReqGVR
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type InstallFileResp = {
|
|
79
|
+
message?: string
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type GetInstallVersionReq = {
|
|
83
|
+
cluster?: string
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export type GetInstallVersionRespSupportVersion = {
|
|
87
|
+
minVersion?: string
|
|
88
|
+
maxVersion?: string
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type GetInstallVersionRespStatus = {
|
|
92
|
+
inRange?: boolean
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export type GetInstallVersionResp = {
|
|
96
|
+
clusterVersion?: string
|
|
97
|
+
supportVersion?: GetInstallVersionRespSupportVersion
|
|
98
|
+
status?: GetInstallVersionRespStatus
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type RestartInstanceReq = {
|
|
102
|
+
workspaceId?: number
|
|
103
|
+
cluster?: string
|
|
104
|
+
namespace?: string
|
|
105
|
+
name?: string
|
|
106
|
+
extra?: string
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type RestartInstanceResp = {
|
|
110
|
+
message?: string
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export type GetPermissionsListReq = {
|
|
114
|
+
workspaceId?: number
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export type GetPermissionsListRespPermissions = {
|
|
118
|
+
getInstance?: boolean
|
|
119
|
+
createInstance?: boolean
|
|
120
|
+
updateInstance?: boolean
|
|
121
|
+
deleteInstance?: boolean
|
|
122
|
+
getMetric?: boolean
|
|
123
|
+
getInstanceLog?: boolean
|
|
124
|
+
getConfig?: boolean
|
|
125
|
+
updateConfig?: boolean
|
|
126
|
+
getBackup?: boolean
|
|
127
|
+
createBackup?: boolean
|
|
128
|
+
updateBackup?: boolean
|
|
129
|
+
deleteBackup?: boolean
|
|
130
|
+
getBackupConf?: boolean
|
|
131
|
+
createBackupConf?: boolean
|
|
132
|
+
updateBackupConf?: boolean
|
|
133
|
+
deleteBackupConf?: boolean
|
|
134
|
+
getTemplate?: boolean
|
|
135
|
+
createTemplate?: boolean
|
|
136
|
+
updateTemplate?: boolean
|
|
137
|
+
deleteTemplate?: boolean
|
|
138
|
+
getUserPassword?: boolean
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type GetPermissionsListResp = {
|
|
142
|
+
permissionsBool?: GetPermissionsListRespPermissions
|
|
143
|
+
permissions?: PermissionsType[]
|
|
144
|
+
}
|
|
145
|
+
|
|
36
146
|
export type GetAllEventKindsListResp = {
|
|
37
147
|
data?: string[]
|
|
38
148
|
}
|
|
@@ -106,8 +216,32 @@ export type GetClusterNodeLabelListRespLabel = {
|
|
|
106
216
|
value?: string[]
|
|
107
217
|
}
|
|
108
218
|
|
|
219
|
+
export type GetClusterNodeLabelListRespNode2Label = {
|
|
220
|
+
nodeName?: string
|
|
221
|
+
label?: GetClusterNodeLabelListRespLabel[]
|
|
222
|
+
}
|
|
223
|
+
|
|
109
224
|
export type GetClusterNodeLabelListResp = {
|
|
110
225
|
items?: GetClusterNodeLabelListRespLabel[]
|
|
226
|
+
items1?: GetClusterNodeLabelListRespNode2Label[]
|
|
227
|
+
pagination?: CommonCommon.Pagination
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export type GetClusterPodLabelListReq = {
|
|
231
|
+
page?: number
|
|
232
|
+
pageSize?: number
|
|
233
|
+
searchKey?: string
|
|
234
|
+
filterNamespace?: string
|
|
235
|
+
cluster?: string
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export type GetClusterPodLabelListRespLabel = {
|
|
239
|
+
key?: string
|
|
240
|
+
value?: string[]
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export type GetClusterPodLabelListResp = {
|
|
244
|
+
items?: GetClusterPodLabelListRespLabel[]
|
|
111
245
|
pagination?: CommonCommon.Pagination
|
|
112
246
|
}
|
|
113
247
|
|
|
@@ -183,6 +317,7 @@ export type GetWorkspaceListReq = {
|
|
|
183
317
|
export type GetWorkspaceListRespItem = {
|
|
184
318
|
workspaceId?: number
|
|
185
319
|
alias?: string
|
|
320
|
+
visible?: boolean
|
|
186
321
|
}
|
|
187
322
|
|
|
188
323
|
export type GetWorkspaceListResp = {
|
|
@@ -190,15 +325,39 @@ export type GetWorkspaceListResp = {
|
|
|
190
325
|
pagination?: CommonCommon.Pagination
|
|
191
326
|
}
|
|
192
327
|
|
|
328
|
+
export type GetClusterHostnetworkPortsReq = {
|
|
329
|
+
workspaceId?: number
|
|
330
|
+
cluster?: string
|
|
331
|
+
}
|
|
332
|
+
|
|
193
333
|
export type GetClusterListReq = {
|
|
194
334
|
workspaceId?: number
|
|
335
|
+
searchKey?: string
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export type GetClusterHostnetworkPortsResp = {
|
|
339
|
+
items?: number[]
|
|
195
340
|
}
|
|
196
341
|
|
|
197
342
|
export type GetClusterListResp = {
|
|
198
343
|
items?: string[]
|
|
344
|
+
clusters?: ClusterItem[]
|
|
199
345
|
pagination?: CommonCommon.Pagination
|
|
200
346
|
}
|
|
201
347
|
|
|
348
|
+
export type ClusterItemMetadata = {
|
|
349
|
+
name?: string
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export type ClusterItemStatus = {
|
|
353
|
+
networkMode?: ClusterItemNetworkMode[]
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export type ClusterItem = {
|
|
357
|
+
metadata?: ClusterItemMetadata
|
|
358
|
+
status?: ClusterItemStatus
|
|
359
|
+
}
|
|
360
|
+
|
|
202
361
|
export type GetClusterNamespaceListReq = {
|
|
203
362
|
workspaceId?: number
|
|
204
363
|
cluster?: string
|
|
@@ -206,6 +365,7 @@ export type GetClusterNamespaceListReq = {
|
|
|
206
365
|
|
|
207
366
|
export type GetClusterNamespaceListResp = {
|
|
208
367
|
items?: string[]
|
|
368
|
+
disableItems?: string[]
|
|
209
369
|
pagination?: CommonCommon.Pagination
|
|
210
370
|
}
|
|
211
371
|
|
|
@@ -215,12 +375,46 @@ export type GetInsightAgentStatusReq = {
|
|
|
215
375
|
|
|
216
376
|
export type GetInsightAgentStatusResp = {
|
|
217
377
|
status?: GetInsightAgentStatusRespInsightAgentStatus
|
|
378
|
+
clusterStatus?: CommonCommon.ClusterStatus
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
export type GetResourceQuotaReq = {
|
|
382
|
+
cluster?: string
|
|
383
|
+
namespace?: string
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
export type GetResourceQuotaRespMetadata = {
|
|
387
|
+
uid?: string
|
|
388
|
+
name?: string
|
|
389
|
+
namespace?: string
|
|
390
|
+
annotations?: {[key: string]: string}
|
|
391
|
+
resourceVersion?: string
|
|
392
|
+
creationTimestamp?: string
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export type GetResourceQuotaRespSpec = {
|
|
396
|
+
hard?: {[key: string]: string}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export type GetResourceQuotaRespStatus = {
|
|
400
|
+
hard?: {[key: string]: string}
|
|
401
|
+
used?: {[key: string]: string}
|
|
402
|
+
available?: {[key: string]: string}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export type GetResourceQuotaResp = {
|
|
406
|
+
metadata?: GetResourceQuotaRespMetadata
|
|
407
|
+
spec?: GetResourceQuotaRespSpec
|
|
408
|
+
status?: GetResourceQuotaRespStatus
|
|
218
409
|
}
|
|
219
410
|
|
|
220
411
|
export class Cluster {
|
|
221
412
|
static GetClusterList(req: GetClusterListReq, initReq?: fm.InitReq): Promise<GetClusterListResp> {
|
|
222
413
|
return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
223
414
|
}
|
|
415
|
+
static GetClusterHostnetworkPorts(req: GetClusterHostnetworkPortsReq, initReq?: fm.InitReq): Promise<GetClusterHostnetworkPortsResp> {
|
|
416
|
+
return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/hostnetwork-ports?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
417
|
+
}
|
|
224
418
|
static GetClusterNamespaceList(req: GetClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetClusterNamespaceListResp> {
|
|
225
419
|
return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
|
|
226
420
|
}
|
|
@@ -230,6 +424,9 @@ export class Cluster {
|
|
|
230
424
|
static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
|
|
231
425
|
return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
232
426
|
}
|
|
427
|
+
static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
|
|
428
|
+
return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
429
|
+
}
|
|
233
430
|
static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
|
|
234
431
|
return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
235
432
|
}
|
|
@@ -248,4 +445,19 @@ export class Cluster {
|
|
|
248
445
|
static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
|
|
249
446
|
return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
250
447
|
}
|
|
448
|
+
static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
|
|
449
|
+
return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
450
|
+
}
|
|
451
|
+
static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
|
|
452
|
+
return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
453
|
+
}
|
|
454
|
+
static InstallFile(req: InstallFileReq, initReq?: fm.InitReq): Promise<InstallFileResp> {
|
|
455
|
+
return fm.fetchReq<InstallFileReq, InstallFileResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/install-file`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
456
|
+
}
|
|
457
|
+
static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
|
|
458
|
+
return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
459
|
+
}
|
|
460
|
+
static GetResourceQuota(req: GetResourceQuotaReq, initReq?: fm.InitReq): Promise<GetResourceQuotaResp> {
|
|
461
|
+
return fm.fetchReq<GetResourceQuotaReq, GetResourceQuotaResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/${req["namespace"]}/resourcequota?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
462
|
+
}
|
|
251
463
|
}
|
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",
|
|
@@ -151,6 +161,8 @@ export type PodCommon = {
|
|
|
151
161
|
containersName?: string[]
|
|
152
162
|
ownerReference?: OwnerReference[]
|
|
153
163
|
initContainersName?: string[]
|
|
164
|
+
initContainersStatuses?: ContainerStatus[]
|
|
165
|
+
containersStatuses?: ContainerStatus[]
|
|
154
166
|
}
|
|
155
167
|
|
|
156
168
|
export type OwnerReference = {
|
|
@@ -164,4 +176,53 @@ export type CommonItemStatus = {
|
|
|
164
176
|
serviceAddresses?: string[]
|
|
165
177
|
webManagerAddress?: string
|
|
166
178
|
webLogAddress?: string
|
|
179
|
+
avgPvAllocatedInGb?: number
|
|
180
|
+
avgPvUsedInGb?: number
|
|
181
|
+
cpuUtilization?: number
|
|
182
|
+
memoryUtilization?: number
|
|
183
|
+
clusterStatus?: ClusterStatus
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export type AccessWhitelistInternal = {
|
|
187
|
+
namespace?: string
|
|
188
|
+
podSelector?: {[key: string]: string}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export type AccessWhitelistExternal = {
|
|
192
|
+
cidr?: string
|
|
193
|
+
ip?: string
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export type AccessWhitelist = {
|
|
197
|
+
internals?: AccessWhitelistInternal[]
|
|
198
|
+
externals?: AccessWhitelistExternal[]
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export type ContainerStatus = {
|
|
202
|
+
name?: string
|
|
203
|
+
state?: ContainerState
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export type ContainerState = {
|
|
207
|
+
waiting?: ContainerStateWaiting
|
|
208
|
+
running?: ContainerStateRunning
|
|
209
|
+
terminated?: ContainerStateTerminated
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export type ContainerStateWaiting = {
|
|
213
|
+
reason?: string
|
|
214
|
+
message?: string
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export type ContainerStateRunning = {
|
|
218
|
+
startedAt?: string
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export type ContainerStateTerminated = {
|
|
222
|
+
exitCode?: number
|
|
223
|
+
signal?: number
|
|
224
|
+
reason?: string
|
|
225
|
+
message?: string
|
|
226
|
+
startedAt?: string
|
|
227
|
+
finishedAt?: string
|
|
167
228
|
}
|
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> =
|
|
@@ -22,6 +23,62 @@ export enum Status {
|
|
|
22
23
|
Creating = "Creating",
|
|
23
24
|
}
|
|
24
25
|
|
|
26
|
+
export enum GetPostgresqlTopologyRespNodePodStatus {
|
|
27
|
+
Pending = "Pending",
|
|
28
|
+
Running = "Running",
|
|
29
|
+
Succeeded = "Succeeded",
|
|
30
|
+
Failed = "Failed",
|
|
31
|
+
Unknown = "Unknown",
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export enum GetPostgresqlTopologyRespNodeRole {
|
|
35
|
+
RoleUnknown = "RoleUnknown",
|
|
36
|
+
RoleMaster = "RoleMaster",
|
|
37
|
+
RoleReplica = "RoleReplica",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export enum GetPostgresqlS3ConfigListReqSortDir {
|
|
41
|
+
ASC = "ASC",
|
|
42
|
+
DESC = "DESC",
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export enum GetPostgresqlBackupListReqSortDir {
|
|
46
|
+
ASC = "ASC",
|
|
47
|
+
DESC = "DESC",
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus {
|
|
51
|
+
Running = "Running",
|
|
52
|
+
Failed = "Failed",
|
|
53
|
+
Succeeded = "Succeeded",
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType {
|
|
57
|
+
Full = "Full",
|
|
58
|
+
Incremental = "Incremental",
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod {
|
|
62
|
+
Manual = "Manual",
|
|
63
|
+
Auto = "Auto",
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export enum PostgresqlBackupItemStatusStatus {
|
|
67
|
+
Running = "Running",
|
|
68
|
+
Failed = "Failed",
|
|
69
|
+
Succeeded = "Succeeded",
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export enum PostgresqlBackupItemStatusBackupType {
|
|
73
|
+
Full = "Full",
|
|
74
|
+
Incremental = "Incremental",
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export enum PostgresqlBackupItemStatusBackupMethod {
|
|
78
|
+
Manual = "Manual",
|
|
79
|
+
Auto = "Auto",
|
|
80
|
+
}
|
|
81
|
+
|
|
25
82
|
export enum GetPostgresqlListReqSortDir {
|
|
26
83
|
ASC = "ASC",
|
|
27
84
|
DESC = "DESC",
|
|
@@ -67,6 +124,198 @@ export enum GetPostgresqlConfRespItemsParamType {
|
|
|
67
124
|
conf = "conf",
|
|
68
125
|
}
|
|
69
126
|
|
|
127
|
+
export type GetPostgresqlTopologyReq = {
|
|
128
|
+
cluster?: string
|
|
129
|
+
namespace?: string
|
|
130
|
+
name?: string
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export type GetPostgresqlTopologyRespNode = {
|
|
134
|
+
cluster?: string
|
|
135
|
+
namespace?: string
|
|
136
|
+
podName?: string
|
|
137
|
+
ip?: string
|
|
138
|
+
podStatus?: GetPostgresqlTopologyRespNodePodStatus
|
|
139
|
+
totalContainer?: number
|
|
140
|
+
totalContainerReady?: number
|
|
141
|
+
podCpuRequest?: string
|
|
142
|
+
podMemoryRequest?: string
|
|
143
|
+
podCpuLimit?: string
|
|
144
|
+
podMemoryLimit?: string
|
|
145
|
+
role?: GetPostgresqlTopologyRespNodeRole
|
|
146
|
+
syncState?: string
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export type GetPostgresqlTopologyRespEdges = {
|
|
150
|
+
source?: string
|
|
151
|
+
target?: string
|
|
152
|
+
properties?: {[key: string]: string}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export type GetPostgresqlTopologyResp = {
|
|
156
|
+
nodes?: GetPostgresqlTopologyRespNode[]
|
|
157
|
+
edges?: GetPostgresqlTopologyRespEdges[]
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export type CreatePostgresqlRestoreReq = {
|
|
161
|
+
cluster?: string
|
|
162
|
+
namespace?: string
|
|
163
|
+
name?: string
|
|
164
|
+
backupName?: string
|
|
165
|
+
targetPostgresqlName?: string
|
|
166
|
+
targetPostgresqlNamespace?: string
|
|
167
|
+
targetPostgresqlCluster?: string
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export type CreatePostgresqlRestoreResp = {
|
|
171
|
+
message?: string
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export type DeletePostgresqlBackupReq = {
|
|
175
|
+
cluster?: string
|
|
176
|
+
namespace?: string
|
|
177
|
+
name?: string
|
|
178
|
+
backupName?: string
|
|
179
|
+
removeRemoteBackup?: boolean
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export type DeletePostgresqlBackupResp = {
|
|
183
|
+
message?: string
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export type CreateBucketExistCheckingReq = {
|
|
187
|
+
endpoint?: string
|
|
188
|
+
accessKey?: string
|
|
189
|
+
secretKey?: string
|
|
190
|
+
bucket?: string
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export type CreateBucketExistCheckingResp = {
|
|
194
|
+
message?: string
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export type UpdatePostgresqlS3ConfigReq = {
|
|
198
|
+
cluster?: string
|
|
199
|
+
namespace?: string
|
|
200
|
+
name?: string
|
|
201
|
+
description?: string
|
|
202
|
+
endpoint?: string
|
|
203
|
+
accessKey?: string
|
|
204
|
+
secretKey?: string
|
|
205
|
+
bucket?: string
|
|
206
|
+
retentionTime?: string
|
|
207
|
+
provider?: string
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export type UpdatePostgresqlS3ConfigResp = {
|
|
211
|
+
message?: string
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export type GetPostgresqlS3ConfigListReq = {
|
|
215
|
+
page?: number
|
|
216
|
+
pageSize?: number
|
|
217
|
+
sortDir?: GetPostgresqlS3ConfigListReqSortDir
|
|
218
|
+
sortBy?: string
|
|
219
|
+
searchKey?: string
|
|
220
|
+
workspaceId?: number
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus = {
|
|
224
|
+
createTimestamp?: string
|
|
225
|
+
updateTimestamp?: string
|
|
226
|
+
backupPath?: string
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems = {
|
|
230
|
+
spec?: UpdatePostgresqlS3ConfigReq
|
|
231
|
+
status?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export type GetPostgresqlS3ConfigListResp = {
|
|
235
|
+
items?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems[]
|
|
236
|
+
pagination?: CommonCommon.Pagination
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export type UpdatePostgresqlBackupConfigReq = {
|
|
240
|
+
cluster?: string
|
|
241
|
+
namespace?: string
|
|
242
|
+
name?: string
|
|
243
|
+
isOpenAutoBackup?: boolean
|
|
244
|
+
backupSchedule?: string
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export type UpdatePostgresqlBackupConfigResp = {
|
|
248
|
+
message?: string
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export type GetPostgresqlBackupListReq = {
|
|
252
|
+
page?: number
|
|
253
|
+
pageSize?: number
|
|
254
|
+
sortDir?: GetPostgresqlBackupListReqSortDir
|
|
255
|
+
sortBy?: string
|
|
256
|
+
searchKey?: string
|
|
257
|
+
cluster?: string
|
|
258
|
+
namespace?: string
|
|
259
|
+
name?: string
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemMetadata = {
|
|
263
|
+
creationTimestamp?: string
|
|
264
|
+
name?: string
|
|
265
|
+
namespace?: string
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition = {
|
|
269
|
+
type?: string
|
|
270
|
+
status?: string
|
|
271
|
+
reason?: string
|
|
272
|
+
message?: string
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemStatus = {
|
|
276
|
+
completionTimestamp?: string
|
|
277
|
+
startTime?: string
|
|
278
|
+
active?: number
|
|
279
|
+
succeeded?: number
|
|
280
|
+
failed?: number
|
|
281
|
+
conditions?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition[]
|
|
282
|
+
status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus
|
|
283
|
+
backupType?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType
|
|
284
|
+
backupMethod?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod
|
|
285
|
+
storePath?: string
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItem = {
|
|
289
|
+
metadata?: GetPostgresqlBackupListRespPostgresqlBackupItemMetadata
|
|
290
|
+
spec?: CreatePostgresqlBackupReq
|
|
291
|
+
status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatus
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export type GetPostgresqlBackupListResp = {
|
|
295
|
+
items?: GetPostgresqlBackupListRespPostgresqlBackupItem[]
|
|
296
|
+
pagination?: CommonCommon.Pagination
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export type CreatePostgresqlBackupReq = {
|
|
300
|
+
cluster?: string
|
|
301
|
+
namespace?: string
|
|
302
|
+
name?: string
|
|
303
|
+
backupName?: string
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export type CreatePostgresqlBackupResp = {
|
|
307
|
+
message?: string
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export type PostgresqlBackupItemStatus = {
|
|
311
|
+
status?: PostgresqlBackupItemStatusStatus
|
|
312
|
+
message?: string
|
|
313
|
+
backupUrl?: string
|
|
314
|
+
backupType?: PostgresqlBackupItemStatusBackupType
|
|
315
|
+
backupMethod?: PostgresqlBackupItemStatusBackupMethod
|
|
316
|
+
completionTimestamp?: string
|
|
317
|
+
}
|
|
318
|
+
|
|
70
319
|
export type GetPostgresqlUsersReq = {
|
|
71
320
|
cluster?: string
|
|
72
321
|
namespace?: string
|
|
@@ -138,6 +387,7 @@ export type CreatePostgresqlReq = {
|
|
|
138
387
|
memoryRequest?: string
|
|
139
388
|
memoryLimit?: string
|
|
140
389
|
conf?: string
|
|
390
|
+
confTemplateName?: string
|
|
141
391
|
isOpenPgAdmin?: boolean
|
|
142
392
|
pgAdminServiceType?: CommonCommon.ServiceType
|
|
143
393
|
pgAdminNodePort?: number
|
|
@@ -149,6 +399,8 @@ export type CreatePostgresqlReq = {
|
|
|
149
399
|
pgAdminDefaultEmail?: string
|
|
150
400
|
pgAdminDefaultPassword?: string
|
|
151
401
|
affinity?: CommonCommon.Affinity
|
|
402
|
+
backupConfig?: UpdatePostgresqlBackupConfigReq
|
|
403
|
+
accessWhitelist?: CommonCommon.AccessWhitelist
|
|
152
404
|
externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
|
|
153
405
|
lbTyp?: CommonCommon.LBTyp
|
|
154
406
|
lbPoolName?: string
|
|
@@ -164,6 +416,8 @@ export type UpdatePostgresqlConfReq = {
|
|
|
164
416
|
namespace?: string
|
|
165
417
|
name?: string
|
|
166
418
|
conf?: string
|
|
419
|
+
confItems?: TemplateTemplate.TemplateConfigItem[]
|
|
420
|
+
reloadFromConfTemplateName?: string
|
|
167
421
|
}
|
|
168
422
|
|
|
169
423
|
export type UpdatePostgresqlParamsResp = {
|
|
@@ -178,13 +432,6 @@ export type GetPostgresqlParamRespSelectDataStringValue = {
|
|
|
178
432
|
value?: string
|
|
179
433
|
}
|
|
180
434
|
|
|
181
|
-
export type GetPostgresqlParamRespSelectDataResourceValue = {
|
|
182
|
-
cpuRequest?: string
|
|
183
|
-
cpuLimit?: string
|
|
184
|
-
memoryRequest?: string
|
|
185
|
-
memoryLimit?: string
|
|
186
|
-
}
|
|
187
|
-
|
|
188
435
|
export type GetPostgresqlParamRespSelectDataIntValue = {
|
|
189
436
|
value?: number
|
|
190
437
|
}
|
|
@@ -199,7 +446,7 @@ type BaseGetPostgresqlParamRespSelectData = {
|
|
|
199
446
|
}
|
|
200
447
|
|
|
201
448
|
export type GetPostgresqlParamRespSelectData = BaseGetPostgresqlParamRespSelectData
|
|
202
|
-
& OneOf<{ sValue: GetPostgresqlParamRespSelectDataStringValue;
|
|
449
|
+
& OneOf<{ sValue: GetPostgresqlParamRespSelectDataStringValue; iValue: GetPostgresqlParamRespSelectDataIntValue; scValue: GetPostgresqlParamRespSelectDataStorageClassValue }>
|
|
203
450
|
|
|
204
451
|
export type GetPostgresqlParamRespSelect = {
|
|
205
452
|
selectType?: GetPostgresqlParamRespSelectSelectType
|
|
@@ -210,7 +457,6 @@ export type GetPostgresqlParamResp = {
|
|
|
210
457
|
version?: GetPostgresqlParamRespSelect
|
|
211
458
|
conf?: GetPostgresqlParamRespSelect
|
|
212
459
|
replicas?: GetPostgresqlParamRespSelect
|
|
213
|
-
resource?: GetPostgresqlParamRespSelect
|
|
214
460
|
storage?: GetPostgresqlParamRespSelect
|
|
215
461
|
}
|
|
216
462
|
|
|
@@ -290,6 +536,8 @@ export type GetPostgresqlGrafanaAddrReq = {
|
|
|
290
536
|
cluster?: string
|
|
291
537
|
namespace?: string
|
|
292
538
|
name?: string
|
|
539
|
+
from?: string
|
|
540
|
+
to?: string
|
|
293
541
|
}
|
|
294
542
|
|
|
295
543
|
export type GetPostgresqlGrafanaAddrResp = {
|
|
@@ -329,6 +577,7 @@ export type PostgresqlItemStatus = {
|
|
|
329
577
|
clusterIPs?: string[]
|
|
330
578
|
avgReplicationLagInBytes?: string
|
|
331
579
|
common?: CommonCommon.CommonItemStatus
|
|
580
|
+
isControl?: boolean
|
|
332
581
|
}
|
|
333
582
|
|
|
334
583
|
export type PostgresqlItemMetadata = {
|
|
@@ -336,6 +585,7 @@ export type PostgresqlItemMetadata = {
|
|
|
336
585
|
creationTimestamp?: string
|
|
337
586
|
name?: string
|
|
338
587
|
namespace?: string
|
|
588
|
+
uid?: string
|
|
339
589
|
}
|
|
340
590
|
|
|
341
591
|
export type PostgresqlItem = {
|
|
@@ -386,4 +636,31 @@ export class Postgresql {
|
|
|
386
636
|
static GetPostgresqlUsers(req: GetPostgresqlUsersReq, initReq?: fm.InitReq): Promise<GetPostgresqlUsersResp> {
|
|
387
637
|
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"})
|
|
388
638
|
}
|
|
639
|
+
static GetPostgresqlBackupList(req: GetPostgresqlBackupListReq, initReq?: fm.InitReq): Promise<GetPostgresqlBackupListResp> {
|
|
640
|
+
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"})
|
|
641
|
+
}
|
|
642
|
+
static CreatePostgresqlBackup(req: CreatePostgresqlBackupReq, initReq?: fm.InitReq): Promise<CreatePostgresqlBackupResp> {
|
|
643
|
+
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)})
|
|
644
|
+
}
|
|
645
|
+
static CreatePostgresqlRestore(req: CreatePostgresqlRestoreReq, initReq?: fm.InitReq): Promise<CreatePostgresqlRestoreResp> {
|
|
646
|
+
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)})
|
|
647
|
+
}
|
|
648
|
+
static DeletePostgresqlBackup(req: DeletePostgresqlBackupReq, initReq?: fm.InitReq): Promise<DeletePostgresqlBackupResp> {
|
|
649
|
+
return fm.fetchReq<DeletePostgresqlBackupReq, DeletePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/backups/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/${req["backupName"]}`, {...initReq, method: "DELETE"})
|
|
650
|
+
}
|
|
651
|
+
static UpdatePostgresqlBackupConfig(req: UpdatePostgresqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlBackupConfigResp> {
|
|
652
|
+
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)})
|
|
653
|
+
}
|
|
654
|
+
static GetPostgresqlS3ConfigList(req: GetPostgresqlS3ConfigListReq, initReq?: fm.InitReq): Promise<GetPostgresqlS3ConfigListResp> {
|
|
655
|
+
return fm.fetchReq<GetPostgresqlS3ConfigListReq, GetPostgresqlS3ConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/s3/configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
656
|
+
}
|
|
657
|
+
static UpdatePostgresqlS3Config(req: UpdatePostgresqlS3ConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlS3ConfigResp> {
|
|
658
|
+
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)})
|
|
659
|
+
}
|
|
660
|
+
static CreateBucketExistChecking(req: CreateBucketExistCheckingReq, initReq?: fm.InitReq): Promise<CreateBucketExistCheckingResp> {
|
|
661
|
+
return fm.fetchReq<CreateBucketExistCheckingReq, CreateBucketExistCheckingResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/s3/config/checking`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
662
|
+
}
|
|
663
|
+
static GetPostgresqlTopology(req: GetPostgresqlTopologyReq, initReq?: fm.InitReq): Promise<GetPostgresqlTopologyResp> {
|
|
664
|
+
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"})
|
|
665
|
+
}
|
|
389
666
|
}
|
|
@@ -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,189 @@
|
|
|
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
|
+
pagination?: CommonCommon.Pagination
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type GetTemplateConfigVersionsReq = {
|
|
51
|
+
workspaceId?: number
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type GetTemplateConfigVersionsResp = {
|
|
55
|
+
versions?: string[]
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type GetTemplateConfigStringResp = {
|
|
59
|
+
conf?: 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 CreateTemplateConfigResp = {
|
|
92
|
+
message?: string
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export type UpdateTemplateConfigResp = {
|
|
96
|
+
message?: string
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export type CreateTemplateConfigReq = {
|
|
100
|
+
workspaceId?: number
|
|
101
|
+
targetName?: string
|
|
102
|
+
targetVersion?: string
|
|
103
|
+
targetType?: string
|
|
104
|
+
targetTemplateType?: string
|
|
105
|
+
targetConf?: string
|
|
106
|
+
fromTemplateName?: string
|
|
107
|
+
targetTemplateInstanceType?: TemplateInstanceType
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type UpdateTemplateConfigReq = {
|
|
111
|
+
workspaceId?: number
|
|
112
|
+
name?: string
|
|
113
|
+
version?: string
|
|
114
|
+
type?: string
|
|
115
|
+
templateType?: string
|
|
116
|
+
items?: TemplateConfigItem[]
|
|
117
|
+
conf?: string
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export type GetTemplateConfigResp = {
|
|
121
|
+
data?: UpdateTemplateConfigReq
|
|
122
|
+
pagination?: CommonCommon.Pagination
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export type GetTemplateConfigListReq = {
|
|
126
|
+
page?: number
|
|
127
|
+
pageSize?: number
|
|
128
|
+
sortDir?: GetTemplateConfigListReqSortDir
|
|
129
|
+
sortBy?: string
|
|
130
|
+
searchKey?: string
|
|
131
|
+
workspaceId?: number
|
|
132
|
+
version?: string
|
|
133
|
+
templateInstanceType?: TemplateInstanceType
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export type TemplateConfigItem = {
|
|
137
|
+
name?: string
|
|
138
|
+
default?: string
|
|
139
|
+
current?: string
|
|
140
|
+
value?: string
|
|
141
|
+
isNeedRestart?: boolean
|
|
142
|
+
valueType?: TemplateConfigItemValueType
|
|
143
|
+
valueRemarksZh?: string
|
|
144
|
+
valueRemarksEn?: string
|
|
145
|
+
updateTimestamp?: string
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export type GetTemplateConfigListResp = {
|
|
149
|
+
items?: GetTemplateConfigReq[]
|
|
150
|
+
pagination?: CommonCommon.Pagination
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export type GetTemplateInstanceTypeListReq = {
|
|
154
|
+
workspaceId?: number
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export type GetTemplateInstanceTypeListResp = {
|
|
158
|
+
type?: TemplateInstanceType[]
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export class Template {
|
|
162
|
+
static GetTemplateConfigList(req: GetTemplateConfigListReq, initReq?: fm.InitReq): Promise<GetTemplateConfigListResp> {
|
|
163
|
+
return fm.fetchReq<GetTemplateConfigListReq, GetTemplateConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
164
|
+
}
|
|
165
|
+
static GetTemplateInstanceTypeList(req: GetTemplateInstanceTypeListReq, initReq?: fm.InitReq): Promise<GetTemplateInstanceTypeListResp> {
|
|
166
|
+
return fm.fetchReq<GetTemplateInstanceTypeListReq, GetTemplateInstanceTypeListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_instance_type?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
167
|
+
}
|
|
168
|
+
static GetTemplateConfig(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigResp> {
|
|
169
|
+
return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
170
|
+
}
|
|
171
|
+
static DeleteTemplateConfig(req: DeleteTemplateReq, initReq?: fm.InitReq): Promise<DeleteTemplateConfigResp> {
|
|
172
|
+
return fm.fetchReq<DeleteTemplateReq, DeleteTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/${req["version"]}`, {...initReq, method: "DELETE"})
|
|
173
|
+
}
|
|
174
|
+
static CreateTemplateConfig(req: CreateTemplateConfigReq, initReq?: fm.InitReq): Promise<CreateTemplateConfigResp> {
|
|
175
|
+
return fm.fetchReq<CreateTemplateConfigReq, CreateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
176
|
+
}
|
|
177
|
+
static UpdateTemplateConfig(req: UpdateTemplateConfigReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigResp> {
|
|
178
|
+
return fm.fetchReq<UpdateTemplateConfigReq, UpdateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
179
|
+
}
|
|
180
|
+
static GetTemplateConfigString(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
|
|
181
|
+
return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigStringResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/to_string?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
182
|
+
}
|
|
183
|
+
static UpdateTemplateConfigToItem(req: UpdateTemplateConfigToItemReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigToItemResp> {
|
|
184
|
+
return fm.fetchReq<UpdateTemplateConfigToItemReq, UpdateTemplateConfigToItemResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/to_template`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
185
|
+
}
|
|
186
|
+
static GetTemplateConfigVersions(req: GetTemplateConfigVersionsReq, initReq?: fm.InitReq): Promise<GetTemplateConfigVersionsResp> {
|
|
187
|
+
return fm.fetchReq<GetTemplateConfigVersionsReq, GetTemplateConfigVersionsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/versions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
188
|
+
}
|
|
189
|
+
}
|
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
|
}
|