@daocloud-proto/mcamel-postgresql 0.9.0-rc1-1 → 0.10.0-rc1-1
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 +44 -2
- package/common.pb.ts +11 -1
- package/package.json +1 -1
- package/postgresql.pb.ts +19 -9
package/cluster.pb.ts
CHANGED
|
@@ -29,6 +29,7 @@ export enum PermissionsType {
|
|
|
29
29
|
CreateTemplate = "CreateTemplate",
|
|
30
30
|
UpdateTemplate = "UpdateTemplate",
|
|
31
31
|
DeleteTemplate = "DeleteTemplate",
|
|
32
|
+
GetUserPassword = "GetUserPassword",
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
export enum EventType {
|
|
@@ -134,6 +135,7 @@ export type GetPermissionsListRespPermissions = {
|
|
|
134
135
|
createTemplate?: boolean
|
|
135
136
|
updateTemplate?: boolean
|
|
136
137
|
deleteTemplate?: boolean
|
|
138
|
+
getUserPassword?: boolean
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
export type GetPermissionsListResp = {
|
|
@@ -214,8 +216,14 @@ export type GetClusterNodeLabelListRespLabel = {
|
|
|
214
216
|
value?: string[]
|
|
215
217
|
}
|
|
216
218
|
|
|
219
|
+
export type GetClusterNodeLabelListRespNode2Label = {
|
|
220
|
+
nodeName?: string
|
|
221
|
+
label?: GetClusterNodeLabelListRespLabel[]
|
|
222
|
+
}
|
|
223
|
+
|
|
217
224
|
export type GetClusterNodeLabelListResp = {
|
|
218
225
|
items?: GetClusterNodeLabelListRespLabel[]
|
|
226
|
+
items1?: GetClusterNodeLabelListRespNode2Label[]
|
|
219
227
|
pagination?: CommonCommon.Pagination
|
|
220
228
|
}
|
|
221
229
|
|
|
@@ -328,7 +336,7 @@ export type GetClusterListReq = {
|
|
|
328
336
|
}
|
|
329
337
|
|
|
330
338
|
export type GetClusterHostnetworkPortsResp = {
|
|
331
|
-
items?:
|
|
339
|
+
items?: number[]
|
|
332
340
|
}
|
|
333
341
|
|
|
334
342
|
export type GetClusterListResp = {
|
|
@@ -357,6 +365,7 @@ export type GetClusterNamespaceListReq = {
|
|
|
357
365
|
|
|
358
366
|
export type GetClusterNamespaceListResp = {
|
|
359
367
|
items?: string[]
|
|
368
|
+
disableItems?: string[]
|
|
360
369
|
pagination?: CommonCommon.Pagination
|
|
361
370
|
}
|
|
362
371
|
|
|
@@ -366,6 +375,36 @@ export type GetInsightAgentStatusReq = {
|
|
|
366
375
|
|
|
367
376
|
export type GetInsightAgentStatusResp = {
|
|
368
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
|
+
}
|
|
403
|
+
|
|
404
|
+
export type GetResourceQuotaResp = {
|
|
405
|
+
metadata?: GetResourceQuotaRespMetadata
|
|
406
|
+
spec?: GetResourceQuotaRespSpec
|
|
407
|
+
status?: GetResourceQuotaRespStatus
|
|
369
408
|
}
|
|
370
409
|
|
|
371
410
|
export class Cluster {
|
|
@@ -373,7 +412,7 @@ export class Cluster {
|
|
|
373
412
|
return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
374
413
|
}
|
|
375
414
|
static GetClusterHostnetworkPorts(req: GetClusterHostnetworkPortsReq, initReq?: fm.InitReq): Promise<GetClusterHostnetworkPortsResp> {
|
|
376
|
-
return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/
|
|
415
|
+
return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/hostnetwork-ports?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
377
416
|
}
|
|
378
417
|
static GetClusterNamespaceList(req: GetClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetClusterNamespaceListResp> {
|
|
379
418
|
return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
|
|
@@ -417,4 +456,7 @@ export class Cluster {
|
|
|
417
456
|
static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
|
|
418
457
|
return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
419
458
|
}
|
|
459
|
+
static GetResourceQuota(req: GetResourceQuotaReq, initReq?: fm.InitReq): Promise<GetResourceQuotaResp> {
|
|
460
|
+
return fm.fetchReq<GetResourceQuotaReq, GetResourceQuotaResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/${req["namespace"]}/resourcequota?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
461
|
+
}
|
|
420
462
|
}
|
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",
|
|
@@ -170,7 +180,7 @@ export type CommonItemStatus = {
|
|
|
170
180
|
avgPvUsedInGb?: number
|
|
171
181
|
cpuUtilization?: number
|
|
172
182
|
memoryUtilization?: number
|
|
173
|
-
|
|
183
|
+
clusterStatus?: ClusterStatus
|
|
174
184
|
}
|
|
175
185
|
|
|
176
186
|
export type AccessWhitelistInternal = {
|
package/package.json
CHANGED
package/postgresql.pb.ts
CHANGED
|
@@ -110,6 +110,20 @@ export enum GetPostgresqlConfRespItemsParamType {
|
|
|
110
110
|
conf = "conf",
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
export type CreatePostgresqlRestoreReq = {
|
|
114
|
+
cluster?: string
|
|
115
|
+
namespace?: string
|
|
116
|
+
name?: string
|
|
117
|
+
backupName?: string
|
|
118
|
+
targetPostgresqlName?: string
|
|
119
|
+
targetPostgresqlNamespace?: string
|
|
120
|
+
targetPostgresqlCluster?: string
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type CreatePostgresqlRestoreResp = {
|
|
124
|
+
message?: string
|
|
125
|
+
}
|
|
126
|
+
|
|
113
127
|
export type DeletePostgresqlBackupReq = {
|
|
114
128
|
cluster?: string
|
|
115
129
|
namespace?: string
|
|
@@ -370,13 +384,6 @@ export type GetPostgresqlParamRespSelectDataStringValue = {
|
|
|
370
384
|
value?: string
|
|
371
385
|
}
|
|
372
386
|
|
|
373
|
-
export type GetPostgresqlParamRespSelectDataResourceValue = {
|
|
374
|
-
cpuRequest?: string
|
|
375
|
-
cpuLimit?: string
|
|
376
|
-
memoryRequest?: string
|
|
377
|
-
memoryLimit?: string
|
|
378
|
-
}
|
|
379
|
-
|
|
380
387
|
export type GetPostgresqlParamRespSelectDataIntValue = {
|
|
381
388
|
value?: number
|
|
382
389
|
}
|
|
@@ -391,7 +398,7 @@ type BaseGetPostgresqlParamRespSelectData = {
|
|
|
391
398
|
}
|
|
392
399
|
|
|
393
400
|
export type GetPostgresqlParamRespSelectData = BaseGetPostgresqlParamRespSelectData
|
|
394
|
-
& OneOf<{ sValue: GetPostgresqlParamRespSelectDataStringValue;
|
|
401
|
+
& OneOf<{ sValue: GetPostgresqlParamRespSelectDataStringValue; iValue: GetPostgresqlParamRespSelectDataIntValue; scValue: GetPostgresqlParamRespSelectDataStorageClassValue }>
|
|
395
402
|
|
|
396
403
|
export type GetPostgresqlParamRespSelect = {
|
|
397
404
|
selectType?: GetPostgresqlParamRespSelectSelectType
|
|
@@ -402,7 +409,6 @@ export type GetPostgresqlParamResp = {
|
|
|
402
409
|
version?: GetPostgresqlParamRespSelect
|
|
403
410
|
conf?: GetPostgresqlParamRespSelect
|
|
404
411
|
replicas?: GetPostgresqlParamRespSelect
|
|
405
|
-
resource?: GetPostgresqlParamRespSelect
|
|
406
412
|
storage?: GetPostgresqlParamRespSelect
|
|
407
413
|
}
|
|
408
414
|
|
|
@@ -531,6 +537,7 @@ export type PostgresqlItemMetadata = {
|
|
|
531
537
|
creationTimestamp?: string
|
|
532
538
|
name?: string
|
|
533
539
|
namespace?: string
|
|
540
|
+
uid?: string
|
|
534
541
|
}
|
|
535
542
|
|
|
536
543
|
export type PostgresqlItem = {
|
|
@@ -587,6 +594,9 @@ export class Postgresql {
|
|
|
587
594
|
static CreatePostgresqlBackup(req: CreatePostgresqlBackupReq, initReq?: fm.InitReq): Promise<CreatePostgresqlBackupResp> {
|
|
588
595
|
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)})
|
|
589
596
|
}
|
|
597
|
+
static CreatePostgresqlRestore(req: CreatePostgresqlRestoreReq, initReq?: fm.InitReq): Promise<CreatePostgresqlRestoreResp> {
|
|
598
|
+
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)})
|
|
599
|
+
}
|
|
590
600
|
static DeletePostgresqlBackup(req: DeletePostgresqlBackupReq, initReq?: fm.InitReq): Promise<DeletePostgresqlBackupResp> {
|
|
591
601
|
return fm.fetchReq<DeletePostgresqlBackupReq, DeletePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/backups/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/${req["backupName"]}`, {...initReq, method: "DELETE"})
|
|
592
602
|
}
|