@daocloud-proto/mcamel-postgresql 0.0.2-27 → 0.0.2-271
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 +129 -0
- package/common.pb.ts +52 -0
- package/insight.pb.ts +8 -12
- package/package.json +1 -1
- package/postgresql.pb.ts +213 -0
package/cluster.pb.ts
CHANGED
|
@@ -7,6 +7,30 @@
|
|
|
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
|
+
}
|
|
33
|
+
|
|
10
34
|
export enum EventType {
|
|
11
35
|
EVENT_TYPE_UNSPECIFIED = "EVENT_TYPE_UNSPECIFIED",
|
|
12
36
|
Normal = "Normal",
|
|
@@ -28,11 +52,69 @@ export enum GetWorkspaceListReqSortDir {
|
|
|
28
52
|
DESC = "DESC",
|
|
29
53
|
}
|
|
30
54
|
|
|
55
|
+
export enum ClusterItemNetworkMode {
|
|
56
|
+
Unknown = "Unknown",
|
|
57
|
+
Flannel = "Flannel",
|
|
58
|
+
Calico = "Calico",
|
|
59
|
+
}
|
|
60
|
+
|
|
31
61
|
export enum GetInsightAgentStatusRespInsightAgentStatus {
|
|
32
62
|
NotInstall = "NotInstall",
|
|
33
63
|
Install = "Install",
|
|
34
64
|
}
|
|
35
65
|
|
|
66
|
+
export type RestartInstanceReq = {
|
|
67
|
+
workspaceId?: number
|
|
68
|
+
cluster?: string
|
|
69
|
+
namespace?: string
|
|
70
|
+
name?: string
|
|
71
|
+
extra?: string
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type RestartInstanceResp = {
|
|
75
|
+
message?: string
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type GetPermissionsListReq = {
|
|
79
|
+
workspaceId?: number
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type GetPermissionsListRespPermissions = {
|
|
83
|
+
getInstance?: boolean
|
|
84
|
+
createInstance?: boolean
|
|
85
|
+
updateInstance?: boolean
|
|
86
|
+
deleteInstance?: boolean
|
|
87
|
+
getMetric?: boolean
|
|
88
|
+
getInstanceLog?: boolean
|
|
89
|
+
getConfig?: boolean
|
|
90
|
+
updateConfig?: boolean
|
|
91
|
+
getBackup?: boolean
|
|
92
|
+
createBackup?: boolean
|
|
93
|
+
updateBackup?: boolean
|
|
94
|
+
deleteBackup?: boolean
|
|
95
|
+
getBackupConf?: boolean
|
|
96
|
+
createBackupConf?: boolean
|
|
97
|
+
updateBackupConf?: boolean
|
|
98
|
+
deleteBackupConf?: boolean
|
|
99
|
+
getTemplate?: boolean
|
|
100
|
+
createTemplate?: boolean
|
|
101
|
+
updateTemplate?: boolean
|
|
102
|
+
deleteTemplate?: boolean
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type GetPermissionsListResp = {
|
|
106
|
+
permissionsBool?: GetPermissionsListRespPermissions
|
|
107
|
+
permissions?: PermissionsType[]
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type GetAllEventKindsListResp = {
|
|
111
|
+
data?: string[]
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export type GetAllEventKindsListReq = {
|
|
115
|
+
cluster?: string
|
|
116
|
+
}
|
|
117
|
+
|
|
36
118
|
export type GetAllEventListReq = {
|
|
37
119
|
page?: number
|
|
38
120
|
pageSize?: number
|
|
@@ -43,6 +125,7 @@ export type GetAllEventListReq = {
|
|
|
43
125
|
namespace?: string
|
|
44
126
|
name?: string
|
|
45
127
|
eventType?: EventType
|
|
128
|
+
kindName?: string
|
|
46
129
|
}
|
|
47
130
|
|
|
48
131
|
export type GetAllEventListRespItemsSource = {
|
|
@@ -102,6 +185,24 @@ export type GetClusterNodeLabelListResp = {
|
|
|
102
185
|
pagination?: CommonCommon.Pagination
|
|
103
186
|
}
|
|
104
187
|
|
|
188
|
+
export type GetClusterPodLabelListReq = {
|
|
189
|
+
page?: number
|
|
190
|
+
pageSize?: number
|
|
191
|
+
searchKey?: string
|
|
192
|
+
filterNamespace?: string
|
|
193
|
+
cluster?: string
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export type GetClusterPodLabelListRespLabel = {
|
|
197
|
+
key?: string
|
|
198
|
+
value?: string[]
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export type GetClusterPodLabelListResp = {
|
|
202
|
+
items?: GetClusterPodLabelListRespLabel[]
|
|
203
|
+
pagination?: CommonCommon.Pagination
|
|
204
|
+
}
|
|
205
|
+
|
|
105
206
|
export type GetClusterNodePortListReq = {
|
|
106
207
|
cluster?: string
|
|
107
208
|
}
|
|
@@ -174,6 +275,7 @@ export type GetWorkspaceListReq = {
|
|
|
174
275
|
export type GetWorkspaceListRespItem = {
|
|
175
276
|
workspaceId?: number
|
|
176
277
|
alias?: string
|
|
278
|
+
visible?: boolean
|
|
177
279
|
}
|
|
178
280
|
|
|
179
281
|
export type GetWorkspaceListResp = {
|
|
@@ -183,13 +285,28 @@ export type GetWorkspaceListResp = {
|
|
|
183
285
|
|
|
184
286
|
export type GetClusterListReq = {
|
|
185
287
|
workspaceId?: number
|
|
288
|
+
searchKey?: string
|
|
186
289
|
}
|
|
187
290
|
|
|
188
291
|
export type GetClusterListResp = {
|
|
189
292
|
items?: string[]
|
|
293
|
+
clusters?: ClusterItem[]
|
|
190
294
|
pagination?: CommonCommon.Pagination
|
|
191
295
|
}
|
|
192
296
|
|
|
297
|
+
export type ClusterItemMetadata = {
|
|
298
|
+
name?: string
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export type ClusterItemStatus = {
|
|
302
|
+
networkMode?: ClusterItemNetworkMode[]
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export type ClusterItem = {
|
|
306
|
+
metadata?: ClusterItemMetadata
|
|
307
|
+
status?: ClusterItemStatus
|
|
308
|
+
}
|
|
309
|
+
|
|
193
310
|
export type GetClusterNamespaceListReq = {
|
|
194
311
|
workspaceId?: number
|
|
195
312
|
cluster?: string
|
|
@@ -221,6 +338,9 @@ export class Cluster {
|
|
|
221
338
|
static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
|
|
222
339
|
return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
223
340
|
}
|
|
341
|
+
static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
|
|
342
|
+
return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
343
|
+
}
|
|
224
344
|
static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
|
|
225
345
|
return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
226
346
|
}
|
|
@@ -233,7 +353,16 @@ export class Cluster {
|
|
|
233
353
|
static GetAllEventList(req: GetAllEventListReq, initReq?: fm.InitReq): Promise<GetAllEventListResp> {
|
|
234
354
|
return fm.fetchReq<GetAllEventListReq, GetAllEventListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/${req["namespace"]}/${req["name"]}/all-events?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
235
355
|
}
|
|
356
|
+
static GetAllEventKindsList(req: GetAllEventKindsListReq, initReq?: fm.InitReq): Promise<GetAllEventKindsListResp> {
|
|
357
|
+
return fm.fetchReq<GetAllEventKindsListReq, GetAllEventKindsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/all-events-kinds?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
358
|
+
}
|
|
236
359
|
static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
|
|
237
360
|
return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
238
361
|
}
|
|
362
|
+
static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
|
|
363
|
+
return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
364
|
+
}
|
|
365
|
+
static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
|
|
366
|
+
return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
367
|
+
}
|
|
239
368
|
}
|
package/common.pb.ts
CHANGED
|
@@ -145,10 +145,14 @@ export type PodCommon = {
|
|
|
145
145
|
cpuLimit?: number
|
|
146
146
|
memoryUsage?: number
|
|
147
147
|
memoryLimit?: number
|
|
148
|
+
pvUsedInGb?: number
|
|
149
|
+
pvAllocatedInGb?: number
|
|
148
150
|
conditions?: PodCommonCondition[]
|
|
149
151
|
containersName?: string[]
|
|
150
152
|
ownerReference?: OwnerReference[]
|
|
151
153
|
initContainersName?: string[]
|
|
154
|
+
initContainersStatuses?: ContainerStatus[]
|
|
155
|
+
containersStatuses?: ContainerStatus[]
|
|
152
156
|
}
|
|
153
157
|
|
|
154
158
|
export type OwnerReference = {
|
|
@@ -162,4 +166,52 @@ export type CommonItemStatus = {
|
|
|
162
166
|
serviceAddresses?: string[]
|
|
163
167
|
webManagerAddress?: string
|
|
164
168
|
webLogAddress?: string
|
|
169
|
+
avgPvAllocatedInGb?: number
|
|
170
|
+
avgPvUsedInGb?: number
|
|
171
|
+
cpuUtilization?: number
|
|
172
|
+
memoryUtilization?: number
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export type AccessWhitelistInternal = {
|
|
176
|
+
namespace?: string
|
|
177
|
+
podSelector?: {[key: string]: string}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export type AccessWhitelistExternal = {
|
|
181
|
+
cidr?: string
|
|
182
|
+
ip?: string
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export type AccessWhitelist = {
|
|
186
|
+
internals?: AccessWhitelistInternal[]
|
|
187
|
+
externals?: AccessWhitelistExternal[]
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export type ContainerStatus = {
|
|
191
|
+
name?: string
|
|
192
|
+
state?: ContainerState
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export type ContainerState = {
|
|
196
|
+
waiting?: ContainerStateWaiting
|
|
197
|
+
running?: ContainerStateRunning
|
|
198
|
+
terminated?: ContainerStateTerminated
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export type ContainerStateWaiting = {
|
|
202
|
+
reason?: string
|
|
203
|
+
message?: string
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export type ContainerStateRunning = {
|
|
207
|
+
startedAt?: string
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export type ContainerStateTerminated = {
|
|
211
|
+
exitCode?: number
|
|
212
|
+
signal?: number
|
|
213
|
+
reason?: string
|
|
214
|
+
message?: string
|
|
215
|
+
startedAt?: string
|
|
216
|
+
finishedAt?: string
|
|
165
217
|
}
|
package/insight.pb.ts
CHANGED
|
@@ -20,27 +20,23 @@ export enum TargetType {
|
|
|
20
20
|
DEPLOYMENT = "DEPLOYMENT",
|
|
21
21
|
STATEFULSET = "STATEFULSET",
|
|
22
22
|
DAEMONSET = "DAEMONSET",
|
|
23
|
-
CRONJOB = "CRONJOB",
|
|
24
23
|
POD = "POD",
|
|
25
24
|
}
|
|
26
25
|
|
|
27
|
-
export enum AlertStatus {
|
|
28
|
-
ALERT_STATUS_UNSPECIFIED = "ALERT_STATUS_UNSPECIFIED",
|
|
29
|
-
ALERT_STATUS_FIRING = "ALERT_STATUS_FIRING",
|
|
30
|
-
ALERT_STATUS_RESOLVED = "ALERT_STATUS_RESOLVED",
|
|
31
|
-
}
|
|
32
|
-
|
|
33
26
|
export type AlertSummary = {
|
|
34
|
-
|
|
27
|
+
id?: string
|
|
28
|
+
groupName?: string
|
|
29
|
+
groupId?: string
|
|
35
30
|
ruleName?: string
|
|
36
|
-
|
|
31
|
+
ruleId?: string
|
|
37
32
|
clusterName?: string
|
|
38
33
|
namespace?: string
|
|
39
34
|
targetType?: TargetType
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
target?: string
|
|
36
|
+
severity?: Severity
|
|
37
|
+
value?: string
|
|
38
|
+
notifyResponse?: string
|
|
42
39
|
description?: string
|
|
43
40
|
startAt?: string
|
|
44
41
|
updateAt?: string
|
|
45
|
-
notifyResponse?: string
|
|
46
42
|
}
|
package/package.json
CHANGED
package/postgresql.pb.ts
CHANGED
|
@@ -22,6 +22,48 @@ export enum Status {
|
|
|
22
22
|
Creating = "Creating",
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
export enum GetPostgresqlS3ConfigListReqSortDir {
|
|
26
|
+
ASC = "ASC",
|
|
27
|
+
DESC = "DESC",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export enum GetPostgresqlBackupListReqSortDir {
|
|
31
|
+
ASC = "ASC",
|
|
32
|
+
DESC = "DESC",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus {
|
|
36
|
+
Running = "Running",
|
|
37
|
+
Failed = "Failed",
|
|
38
|
+
Succeeded = "Succeeded",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType {
|
|
42
|
+
Full = "Full",
|
|
43
|
+
Incremental = "Incremental",
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod {
|
|
47
|
+
Manual = "Manual",
|
|
48
|
+
Auto = "Auto",
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export enum PostgresqlBackupItemStatusStatus {
|
|
52
|
+
Running = "Running",
|
|
53
|
+
Failed = "Failed",
|
|
54
|
+
Succeeded = "Succeeded",
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export enum PostgresqlBackupItemStatusBackupType {
|
|
58
|
+
Full = "Full",
|
|
59
|
+
Incremental = "Incremental",
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export enum PostgresqlBackupItemStatusBackupMethod {
|
|
63
|
+
Manual = "Manual",
|
|
64
|
+
Auto = "Auto",
|
|
65
|
+
}
|
|
66
|
+
|
|
25
67
|
export enum GetPostgresqlListReqSortDir {
|
|
26
68
|
ASC = "ASC",
|
|
27
69
|
DESC = "DESC",
|
|
@@ -67,6 +109,150 @@ export enum GetPostgresqlConfRespItemsParamType {
|
|
|
67
109
|
conf = "conf",
|
|
68
110
|
}
|
|
69
111
|
|
|
112
|
+
export type DeletePostgresqlBackupReq = {
|
|
113
|
+
cluster?: string
|
|
114
|
+
namespace?: string
|
|
115
|
+
name?: string
|
|
116
|
+
backupName?: string
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type DeletePostgresqlBackupResp = {
|
|
120
|
+
message?: string
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type CreateBucketExistCheckingReq = {
|
|
124
|
+
endpoint?: string
|
|
125
|
+
accessKey?: string
|
|
126
|
+
secretKey?: string
|
|
127
|
+
bucket?: string
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type CreateBucketExistCheckingResp = {
|
|
131
|
+
message?: string
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export type UpdatePostgresqlS3ConfigReq = {
|
|
135
|
+
cluster?: string
|
|
136
|
+
namespace?: string
|
|
137
|
+
name?: string
|
|
138
|
+
description?: string
|
|
139
|
+
endpoint?: string
|
|
140
|
+
accessKey?: string
|
|
141
|
+
secretKey?: string
|
|
142
|
+
bucket?: string
|
|
143
|
+
retentionTime?: string
|
|
144
|
+
provider?: string
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type UpdatePostgresqlS3ConfigResp = {
|
|
148
|
+
message?: string
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export type GetPostgresqlS3ConfigListReq = {
|
|
152
|
+
page?: number
|
|
153
|
+
pageSize?: number
|
|
154
|
+
sortDir?: GetPostgresqlS3ConfigListReqSortDir
|
|
155
|
+
sortBy?: string
|
|
156
|
+
searchKey?: string
|
|
157
|
+
workspaceId?: number
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus = {
|
|
161
|
+
createTimestamp?: string
|
|
162
|
+
updateTimestamp?: string
|
|
163
|
+
backupPath?: string
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems = {
|
|
167
|
+
spec?: UpdatePostgresqlS3ConfigReq
|
|
168
|
+
status?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export type GetPostgresqlS3ConfigListResp = {
|
|
172
|
+
items?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems[]
|
|
173
|
+
pagination?: CommonCommon.Pagination
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export type UpdatePostgresqlBackupConfigReq = {
|
|
177
|
+
cluster?: string
|
|
178
|
+
namespace?: string
|
|
179
|
+
name?: string
|
|
180
|
+
isOpenAutoBackup?: boolean
|
|
181
|
+
backupSchedule?: string
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export type UpdatePostgresqlBackupConfigResp = {
|
|
185
|
+
message?: string
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export type GetPostgresqlBackupListReq = {
|
|
189
|
+
page?: number
|
|
190
|
+
pageSize?: number
|
|
191
|
+
sortDir?: GetPostgresqlBackupListReqSortDir
|
|
192
|
+
sortBy?: string
|
|
193
|
+
searchKey?: string
|
|
194
|
+
cluster?: string
|
|
195
|
+
namespace?: string
|
|
196
|
+
name?: string
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemMetadata = {
|
|
200
|
+
creationTimestamp?: string
|
|
201
|
+
name?: string
|
|
202
|
+
namespace?: string
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition = {
|
|
206
|
+
type?: string
|
|
207
|
+
status?: string
|
|
208
|
+
reason?: string
|
|
209
|
+
message?: string
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemStatus = {
|
|
213
|
+
completionTimestamp?: string
|
|
214
|
+
startTime?: string
|
|
215
|
+
active?: number
|
|
216
|
+
succeeded?: number
|
|
217
|
+
failed?: number
|
|
218
|
+
conditions?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition[]
|
|
219
|
+
status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus
|
|
220
|
+
backupType?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType
|
|
221
|
+
backupMethod?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod
|
|
222
|
+
storePath?: string
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItem = {
|
|
226
|
+
metadata?: GetPostgresqlBackupListRespPostgresqlBackupItemMetadata
|
|
227
|
+
spec?: CreatePostgresqlBackupReq
|
|
228
|
+
status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatus
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export type GetPostgresqlBackupListResp = {
|
|
232
|
+
items?: GetPostgresqlBackupListRespPostgresqlBackupItem[]
|
|
233
|
+
pagination?: CommonCommon.Pagination
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export type CreatePostgresqlBackupReq = {
|
|
237
|
+
cluster?: string
|
|
238
|
+
namespace?: string
|
|
239
|
+
name?: string
|
|
240
|
+
backupName?: string
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export type CreatePostgresqlBackupResp = {
|
|
244
|
+
message?: string
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export type PostgresqlBackupItemStatus = {
|
|
248
|
+
status?: PostgresqlBackupItemStatusStatus
|
|
249
|
+
message?: string
|
|
250
|
+
backupUrl?: string
|
|
251
|
+
backupType?: PostgresqlBackupItemStatusBackupType
|
|
252
|
+
backupMethod?: PostgresqlBackupItemStatusBackupMethod
|
|
253
|
+
completionTimestamp?: string
|
|
254
|
+
}
|
|
255
|
+
|
|
70
256
|
export type GetPostgresqlUsersReq = {
|
|
71
257
|
cluster?: string
|
|
72
258
|
namespace?: string
|
|
@@ -89,6 +275,8 @@ export type GetPostgresqlListReq = {
|
|
|
89
275
|
sortBy?: string
|
|
90
276
|
searchKey?: string
|
|
91
277
|
workspaceId?: number
|
|
278
|
+
filterCluster?: string
|
|
279
|
+
filterNamespace?: string
|
|
92
280
|
}
|
|
93
281
|
|
|
94
282
|
export type GetPostgresqlConfReq = {
|
|
@@ -147,6 +335,7 @@ export type CreatePostgresqlReq = {
|
|
|
147
335
|
pgAdminDefaultEmail?: string
|
|
148
336
|
pgAdminDefaultPassword?: string
|
|
149
337
|
affinity?: CommonCommon.Affinity
|
|
338
|
+
backupConfig?: UpdatePostgresqlBackupConfigReq
|
|
150
339
|
externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
|
|
151
340
|
lbTyp?: CommonCommon.LBTyp
|
|
152
341
|
lbPoolName?: string
|
|
@@ -288,6 +477,8 @@ export type GetPostgresqlGrafanaAddrReq = {
|
|
|
288
477
|
cluster?: string
|
|
289
478
|
namespace?: string
|
|
290
479
|
name?: string
|
|
480
|
+
from?: string
|
|
481
|
+
to?: string
|
|
291
482
|
}
|
|
292
483
|
|
|
293
484
|
export type GetPostgresqlGrafanaAddrResp = {
|
|
@@ -327,6 +518,7 @@ export type PostgresqlItemStatus = {
|
|
|
327
518
|
clusterIPs?: string[]
|
|
328
519
|
avgReplicationLagInBytes?: string
|
|
329
520
|
common?: CommonCommon.CommonItemStatus
|
|
521
|
+
isControl?: boolean
|
|
330
522
|
}
|
|
331
523
|
|
|
332
524
|
export type PostgresqlItemMetadata = {
|
|
@@ -384,4 +576,25 @@ export class Postgresql {
|
|
|
384
576
|
static GetPostgresqlUsers(req: GetPostgresqlUsersReq, initReq?: fm.InitReq): Promise<GetPostgresqlUsersResp> {
|
|
385
577
|
return fm.fetchReq<GetPostgresqlUsersReq, GetPostgresqlUsersResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/users?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
386
578
|
}
|
|
579
|
+
static GetPostgresqlBackupList(req: GetPostgresqlBackupListReq, initReq?: fm.InitReq): Promise<GetPostgresqlBackupListResp> {
|
|
580
|
+
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"})
|
|
581
|
+
}
|
|
582
|
+
static CreatePostgresqlBackup(req: CreatePostgresqlBackupReq, initReq?: fm.InitReq): Promise<CreatePostgresqlBackupResp> {
|
|
583
|
+
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)})
|
|
584
|
+
}
|
|
585
|
+
static DeletePostgresqlBackup(req: DeletePostgresqlBackupReq, initReq?: fm.InitReq): Promise<DeletePostgresqlBackupResp> {
|
|
586
|
+
return fm.fetchReq<DeletePostgresqlBackupReq, DeletePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/backups/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/${req["backupName"]}`, {...initReq, method: "DELETE"})
|
|
587
|
+
}
|
|
588
|
+
static UpdatePostgresqlBackupConfig(req: UpdatePostgresqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlBackupConfigResp> {
|
|
589
|
+
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)})
|
|
590
|
+
}
|
|
591
|
+
static GetPostgresqlS3ConfigList(req: GetPostgresqlS3ConfigListReq, initReq?: fm.InitReq): Promise<GetPostgresqlS3ConfigListResp> {
|
|
592
|
+
return fm.fetchReq<GetPostgresqlS3ConfigListReq, GetPostgresqlS3ConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/s3/configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
593
|
+
}
|
|
594
|
+
static UpdatePostgresqlS3Config(req: UpdatePostgresqlS3ConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlS3ConfigResp> {
|
|
595
|
+
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)})
|
|
596
|
+
}
|
|
597
|
+
static CreateBucketExistChecking(req: CreateBucketExistCheckingReq, initReq?: fm.InitReq): Promise<CreateBucketExistCheckingResp> {
|
|
598
|
+
return fm.fetchReq<CreateBucketExistCheckingReq, CreateBucketExistCheckingResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/s3/config/checking`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
599
|
+
}
|
|
387
600
|
}
|