@daocloud-proto/mcamel-postgresql 0.0.2-45 → 0.0.2-451
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 +285 -9
- package/storage_config.pb.ts +188 -0
- package/template.pb.ts +173 -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,197 @@ 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
|
+
}
|
|
180
|
+
|
|
181
|
+
export type DeletePostgresqlBackupResp = {
|
|
182
|
+
message?: string
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export type CreateBucketExistCheckingReq = {
|
|
186
|
+
endpoint?: string
|
|
187
|
+
accessKey?: string
|
|
188
|
+
secretKey?: string
|
|
189
|
+
bucket?: string
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export type CreateBucketExistCheckingResp = {
|
|
193
|
+
message?: string
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export type UpdatePostgresqlS3ConfigReq = {
|
|
197
|
+
cluster?: string
|
|
198
|
+
namespace?: string
|
|
199
|
+
name?: string
|
|
200
|
+
description?: string
|
|
201
|
+
endpoint?: string
|
|
202
|
+
accessKey?: string
|
|
203
|
+
secretKey?: string
|
|
204
|
+
bucket?: string
|
|
205
|
+
retentionTime?: string
|
|
206
|
+
provider?: string
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export type UpdatePostgresqlS3ConfigResp = {
|
|
210
|
+
message?: string
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export type GetPostgresqlS3ConfigListReq = {
|
|
214
|
+
page?: number
|
|
215
|
+
pageSize?: number
|
|
216
|
+
sortDir?: GetPostgresqlS3ConfigListReqSortDir
|
|
217
|
+
sortBy?: string
|
|
218
|
+
searchKey?: string
|
|
219
|
+
workspaceId?: number
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus = {
|
|
223
|
+
createTimestamp?: string
|
|
224
|
+
updateTimestamp?: string
|
|
225
|
+
backupPath?: string
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems = {
|
|
229
|
+
spec?: UpdatePostgresqlS3ConfigReq
|
|
230
|
+
status?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export type GetPostgresqlS3ConfigListResp = {
|
|
234
|
+
items?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems[]
|
|
235
|
+
pagination?: CommonCommon.Pagination
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export type UpdatePostgresqlBackupConfigReq = {
|
|
239
|
+
cluster?: string
|
|
240
|
+
namespace?: string
|
|
241
|
+
name?: string
|
|
242
|
+
isOpenAutoBackup?: boolean
|
|
243
|
+
backupSchedule?: string
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export type UpdatePostgresqlBackupConfigResp = {
|
|
247
|
+
message?: string
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export type GetPostgresqlBackupListReq = {
|
|
251
|
+
page?: number
|
|
252
|
+
pageSize?: number
|
|
253
|
+
sortDir?: GetPostgresqlBackupListReqSortDir
|
|
254
|
+
sortBy?: string
|
|
255
|
+
searchKey?: string
|
|
256
|
+
cluster?: string
|
|
257
|
+
namespace?: string
|
|
258
|
+
name?: string
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemMetadata = {
|
|
262
|
+
creationTimestamp?: string
|
|
263
|
+
name?: string
|
|
264
|
+
namespace?: string
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition = {
|
|
268
|
+
type?: string
|
|
269
|
+
status?: string
|
|
270
|
+
reason?: string
|
|
271
|
+
message?: string
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemStatus = {
|
|
275
|
+
completionTimestamp?: string
|
|
276
|
+
startTime?: string
|
|
277
|
+
active?: number
|
|
278
|
+
succeeded?: number
|
|
279
|
+
failed?: number
|
|
280
|
+
conditions?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition[]
|
|
281
|
+
status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus
|
|
282
|
+
backupType?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType
|
|
283
|
+
backupMethod?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod
|
|
284
|
+
storePath?: string
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItem = {
|
|
288
|
+
metadata?: GetPostgresqlBackupListRespPostgresqlBackupItemMetadata
|
|
289
|
+
spec?: CreatePostgresqlBackupReq
|
|
290
|
+
status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatus
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export type GetPostgresqlBackupListResp = {
|
|
294
|
+
items?: GetPostgresqlBackupListRespPostgresqlBackupItem[]
|
|
295
|
+
pagination?: CommonCommon.Pagination
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export type CreatePostgresqlBackupReq = {
|
|
299
|
+
cluster?: string
|
|
300
|
+
namespace?: string
|
|
301
|
+
name?: string
|
|
302
|
+
backupName?: string
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export type CreatePostgresqlBackupResp = {
|
|
306
|
+
message?: string
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export type PostgresqlBackupItemStatus = {
|
|
310
|
+
status?: PostgresqlBackupItemStatusStatus
|
|
311
|
+
message?: string
|
|
312
|
+
backupUrl?: string
|
|
313
|
+
backupType?: PostgresqlBackupItemStatusBackupType
|
|
314
|
+
backupMethod?: PostgresqlBackupItemStatusBackupMethod
|
|
315
|
+
completionTimestamp?: string
|
|
316
|
+
}
|
|
317
|
+
|
|
70
318
|
export type GetPostgresqlUsersReq = {
|
|
71
319
|
cluster?: string
|
|
72
320
|
namespace?: string
|
|
@@ -138,6 +386,7 @@ export type CreatePostgresqlReq = {
|
|
|
138
386
|
memoryRequest?: string
|
|
139
387
|
memoryLimit?: string
|
|
140
388
|
conf?: string
|
|
389
|
+
confTemplateName?: string
|
|
141
390
|
isOpenPgAdmin?: boolean
|
|
142
391
|
pgAdminServiceType?: CommonCommon.ServiceType
|
|
143
392
|
pgAdminNodePort?: number
|
|
@@ -149,6 +398,8 @@ export type CreatePostgresqlReq = {
|
|
|
149
398
|
pgAdminDefaultEmail?: string
|
|
150
399
|
pgAdminDefaultPassword?: string
|
|
151
400
|
affinity?: CommonCommon.Affinity
|
|
401
|
+
backupConfig?: UpdatePostgresqlBackupConfigReq
|
|
402
|
+
accessWhitelist?: CommonCommon.AccessWhitelist
|
|
152
403
|
externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
|
|
153
404
|
lbTyp?: CommonCommon.LBTyp
|
|
154
405
|
lbPoolName?: string
|
|
@@ -164,6 +415,8 @@ export type UpdatePostgresqlConfReq = {
|
|
|
164
415
|
namespace?: string
|
|
165
416
|
name?: string
|
|
166
417
|
conf?: string
|
|
418
|
+
confItems?: TemplateTemplate.TemplateConfigItem[]
|
|
419
|
+
reloadFromConfTemplateName?: string
|
|
167
420
|
}
|
|
168
421
|
|
|
169
422
|
export type UpdatePostgresqlParamsResp = {
|
|
@@ -178,13 +431,6 @@ export type GetPostgresqlParamRespSelectDataStringValue = {
|
|
|
178
431
|
value?: string
|
|
179
432
|
}
|
|
180
433
|
|
|
181
|
-
export type GetPostgresqlParamRespSelectDataResourceValue = {
|
|
182
|
-
cpuRequest?: string
|
|
183
|
-
cpuLimit?: string
|
|
184
|
-
memoryRequest?: string
|
|
185
|
-
memoryLimit?: string
|
|
186
|
-
}
|
|
187
|
-
|
|
188
434
|
export type GetPostgresqlParamRespSelectDataIntValue = {
|
|
189
435
|
value?: number
|
|
190
436
|
}
|
|
@@ -199,7 +445,7 @@ type BaseGetPostgresqlParamRespSelectData = {
|
|
|
199
445
|
}
|
|
200
446
|
|
|
201
447
|
export type GetPostgresqlParamRespSelectData = BaseGetPostgresqlParamRespSelectData
|
|
202
|
-
& OneOf<{ sValue: GetPostgresqlParamRespSelectDataStringValue;
|
|
448
|
+
& OneOf<{ sValue: GetPostgresqlParamRespSelectDataStringValue; iValue: GetPostgresqlParamRespSelectDataIntValue; scValue: GetPostgresqlParamRespSelectDataStorageClassValue }>
|
|
203
449
|
|
|
204
450
|
export type GetPostgresqlParamRespSelect = {
|
|
205
451
|
selectType?: GetPostgresqlParamRespSelectSelectType
|
|
@@ -210,7 +456,6 @@ export type GetPostgresqlParamResp = {
|
|
|
210
456
|
version?: GetPostgresqlParamRespSelect
|
|
211
457
|
conf?: GetPostgresqlParamRespSelect
|
|
212
458
|
replicas?: GetPostgresqlParamRespSelect
|
|
213
|
-
resource?: GetPostgresqlParamRespSelect
|
|
214
459
|
storage?: GetPostgresqlParamRespSelect
|
|
215
460
|
}
|
|
216
461
|
|
|
@@ -290,6 +535,8 @@ export type GetPostgresqlGrafanaAddrReq = {
|
|
|
290
535
|
cluster?: string
|
|
291
536
|
namespace?: string
|
|
292
537
|
name?: string
|
|
538
|
+
from?: string
|
|
539
|
+
to?: string
|
|
293
540
|
}
|
|
294
541
|
|
|
295
542
|
export type GetPostgresqlGrafanaAddrResp = {
|
|
@@ -329,6 +576,7 @@ export type PostgresqlItemStatus = {
|
|
|
329
576
|
clusterIPs?: string[]
|
|
330
577
|
avgReplicationLagInBytes?: string
|
|
331
578
|
common?: CommonCommon.CommonItemStatus
|
|
579
|
+
isControl?: boolean
|
|
332
580
|
}
|
|
333
581
|
|
|
334
582
|
export type PostgresqlItemMetadata = {
|
|
@@ -336,6 +584,7 @@ export type PostgresqlItemMetadata = {
|
|
|
336
584
|
creationTimestamp?: string
|
|
337
585
|
name?: string
|
|
338
586
|
namespace?: string
|
|
587
|
+
uid?: string
|
|
339
588
|
}
|
|
340
589
|
|
|
341
590
|
export type PostgresqlItem = {
|
|
@@ -386,4 +635,31 @@ export class Postgresql {
|
|
|
386
635
|
static GetPostgresqlUsers(req: GetPostgresqlUsersReq, initReq?: fm.InitReq): Promise<GetPostgresqlUsersResp> {
|
|
387
636
|
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
637
|
}
|
|
638
|
+
static GetPostgresqlBackupList(req: GetPostgresqlBackupListReq, initReq?: fm.InitReq): Promise<GetPostgresqlBackupListResp> {
|
|
639
|
+
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"})
|
|
640
|
+
}
|
|
641
|
+
static CreatePostgresqlBackup(req: CreatePostgresqlBackupReq, initReq?: fm.InitReq): Promise<CreatePostgresqlBackupResp> {
|
|
642
|
+
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)})
|
|
643
|
+
}
|
|
644
|
+
static CreatePostgresqlRestore(req: CreatePostgresqlRestoreReq, initReq?: fm.InitReq): Promise<CreatePostgresqlRestoreResp> {
|
|
645
|
+
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)})
|
|
646
|
+
}
|
|
647
|
+
static DeletePostgresqlBackup(req: DeletePostgresqlBackupReq, initReq?: fm.InitReq): Promise<DeletePostgresqlBackupResp> {
|
|
648
|
+
return fm.fetchReq<DeletePostgresqlBackupReq, DeletePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/backups/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/${req["backupName"]}`, {...initReq, method: "DELETE"})
|
|
649
|
+
}
|
|
650
|
+
static UpdatePostgresqlBackupConfig(req: UpdatePostgresqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlBackupConfigResp> {
|
|
651
|
+
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)})
|
|
652
|
+
}
|
|
653
|
+
static GetPostgresqlS3ConfigList(req: GetPostgresqlS3ConfigListReq, initReq?: fm.InitReq): Promise<GetPostgresqlS3ConfigListResp> {
|
|
654
|
+
return fm.fetchReq<GetPostgresqlS3ConfigListReq, GetPostgresqlS3ConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/s3/configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
655
|
+
}
|
|
656
|
+
static UpdatePostgresqlS3Config(req: UpdatePostgresqlS3ConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlS3ConfigResp> {
|
|
657
|
+
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)})
|
|
658
|
+
}
|
|
659
|
+
static CreateBucketExistChecking(req: CreateBucketExistCheckingReq, initReq?: fm.InitReq): Promise<CreateBucketExistCheckingResp> {
|
|
660
|
+
return fm.fetchReq<CreateBucketExistCheckingReq, CreateBucketExistCheckingResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/s3/config/checking`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
661
|
+
}
|
|
662
|
+
static GetPostgresqlTopology(req: GetPostgresqlTopologyReq, initReq?: fm.InitReq): Promise<GetPostgresqlTopologyResp> {
|
|
663
|
+
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"})
|
|
664
|
+
}
|
|
389
665
|
}
|
|
@@ -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,173 @@
|
|
|
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 GetTemplateConfigVersionsReq = {
|
|
39
|
+
workspaceId?: number
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type GetTemplateConfigVersionsResp = {
|
|
43
|
+
versions?: string[]
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type GetTemplateConfigStringResp = {
|
|
47
|
+
conf?: string
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type DeleteTemplateReq = {
|
|
51
|
+
workspaceId?: number
|
|
52
|
+
name?: string
|
|
53
|
+
version?: string
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type DeleteTemplateConfigResp = {
|
|
57
|
+
message?: string
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type CreateOrUpdateTemplateConfigResp = {
|
|
61
|
+
message?: string
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type GetTemplateConfigReq = {
|
|
65
|
+
page?: number
|
|
66
|
+
pageSize?: number
|
|
67
|
+
sortDir?: GetTemplateConfigReqSortDir
|
|
68
|
+
sortBy?: string
|
|
69
|
+
searchKey?: string
|
|
70
|
+
workspaceId?: number
|
|
71
|
+
name?: string
|
|
72
|
+
version?: string
|
|
73
|
+
templateType?: string
|
|
74
|
+
type?: string
|
|
75
|
+
createTimestamp?: string
|
|
76
|
+
templateInstanceType?: TemplateInstanceType
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type CreateTemplateConfigResp = {
|
|
80
|
+
message?: string
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type UpdateTemplateConfigResp = {
|
|
84
|
+
message?: string
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export type CreateTemplateConfigReq = {
|
|
88
|
+
workspaceId?: number
|
|
89
|
+
targetName?: string
|
|
90
|
+
targetVersion?: string
|
|
91
|
+
targetType?: string
|
|
92
|
+
targetTemplateType?: string
|
|
93
|
+
targetConf?: string
|
|
94
|
+
fromTemplateName?: string
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type UpdateTemplateConfigReq = {
|
|
98
|
+
workspaceId?: number
|
|
99
|
+
name?: string
|
|
100
|
+
version?: string
|
|
101
|
+
type?: string
|
|
102
|
+
templateType?: string
|
|
103
|
+
items?: TemplateConfigItem[]
|
|
104
|
+
conf?: string
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type GetTemplateConfigResp = {
|
|
108
|
+
data?: UpdateTemplateConfigReq
|
|
109
|
+
pagination?: CommonCommon.Pagination
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type GetTemplateConfigListReq = {
|
|
113
|
+
page?: number
|
|
114
|
+
pageSize?: number
|
|
115
|
+
sortDir?: GetTemplateConfigListReqSortDir
|
|
116
|
+
sortBy?: string
|
|
117
|
+
searchKey?: string
|
|
118
|
+
workspaceId?: number
|
|
119
|
+
version?: string
|
|
120
|
+
templateInstanceType?: TemplateInstanceType
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type TemplateConfigItem = {
|
|
124
|
+
name?: string
|
|
125
|
+
default?: string
|
|
126
|
+
current?: string
|
|
127
|
+
value?: string
|
|
128
|
+
isNeedRestart?: boolean
|
|
129
|
+
valueType?: TemplateConfigItemValueType
|
|
130
|
+
valueRemarksZh?: string
|
|
131
|
+
valueRemarksEn?: string
|
|
132
|
+
updateTimestamp?: string
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export type GetTemplateConfigListResp = {
|
|
136
|
+
items?: GetTemplateConfigReq[]
|
|
137
|
+
pagination?: CommonCommon.Pagination
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export type GetTemplateInstanceTypeListReq = {
|
|
141
|
+
workspaceId?: number
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export type GetTemplateInstanceTypeListResp = {
|
|
145
|
+
type?: TemplateInstanceType[]
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export class Template {
|
|
149
|
+
static GetTemplateConfigList(req: GetTemplateConfigListReq, initReq?: fm.InitReq): Promise<GetTemplateConfigListResp> {
|
|
150
|
+
return fm.fetchReq<GetTemplateConfigListReq, GetTemplateConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
151
|
+
}
|
|
152
|
+
static GetTemplateInstanceTypeList(req: GetTemplateInstanceTypeListReq, initReq?: fm.InitReq): Promise<GetTemplateInstanceTypeListResp> {
|
|
153
|
+
return fm.fetchReq<GetTemplateInstanceTypeListReq, GetTemplateInstanceTypeListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_instance_type?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
154
|
+
}
|
|
155
|
+
static GetTemplateConfig(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigResp> {
|
|
156
|
+
return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
157
|
+
}
|
|
158
|
+
static DeleteTemplateConfig(req: DeleteTemplateReq, initReq?: fm.InitReq): Promise<DeleteTemplateConfigResp> {
|
|
159
|
+
return fm.fetchReq<DeleteTemplateReq, DeleteTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/${req["version"]}`, {...initReq, method: "DELETE"})
|
|
160
|
+
}
|
|
161
|
+
static CreateTemplateConfig(req: CreateTemplateConfigReq, initReq?: fm.InitReq): Promise<CreateTemplateConfigResp> {
|
|
162
|
+
return fm.fetchReq<CreateTemplateConfigReq, CreateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
163
|
+
}
|
|
164
|
+
static UpdateTemplateConfig(req: UpdateTemplateConfigReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigResp> {
|
|
165
|
+
return fm.fetchReq<UpdateTemplateConfigReq, UpdateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
166
|
+
}
|
|
167
|
+
static GetTemplateConfigString(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
|
|
168
|
+
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"})
|
|
169
|
+
}
|
|
170
|
+
static GetTemplateConfigVersions(req: GetTemplateConfigVersionsReq, initReq?: fm.InitReq): Promise<GetTemplateConfigVersionsResp> {
|
|
171
|
+
return fm.fetchReq<GetTemplateConfigVersionsReq, GetTemplateConfigVersionsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/versions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
172
|
+
}
|
|
173
|
+
}
|
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
|
}
|