@daocloud-proto/mcamel-postgresql 0.0.2-2 → 0.0.2-202
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 +59 -0
- package/common.pb.ts +49 -0
- package/insight.pb.ts +8 -12
- package/package.json +1 -1
- package/postgresql.pb.ts +220 -0
package/cluster.pb.ts
CHANGED
|
@@ -33,6 +33,37 @@ export enum GetInsightAgentStatusRespInsightAgentStatus {
|
|
|
33
33
|
Install = "Install",
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
export type GetPermissionsListReq = {
|
|
37
|
+
workspaceId?: number
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type GetPermissionsListResp = {
|
|
41
|
+
getInstance?: boolean
|
|
42
|
+
createInstance?: boolean
|
|
43
|
+
updateInstance?: boolean
|
|
44
|
+
deleteInstance?: boolean
|
|
45
|
+
getMetric?: boolean
|
|
46
|
+
getInstanceLog?: boolean
|
|
47
|
+
getConfig?: boolean
|
|
48
|
+
updateConfig?: boolean
|
|
49
|
+
getBackup?: boolean
|
|
50
|
+
createBackup?: boolean
|
|
51
|
+
updateBackup?: boolean
|
|
52
|
+
deleteBackup?: boolean
|
|
53
|
+
getBackupConf?: boolean
|
|
54
|
+
createBackupConf?: boolean
|
|
55
|
+
updateBackupConf?: boolean
|
|
56
|
+
deleteBackupConf?: boolean
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type GetAllEventKindsListResp = {
|
|
60
|
+
data?: string[]
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type GetAllEventKindsListReq = {
|
|
64
|
+
cluster?: string
|
|
65
|
+
}
|
|
66
|
+
|
|
36
67
|
export type GetAllEventListReq = {
|
|
37
68
|
page?: number
|
|
38
69
|
pageSize?: number
|
|
@@ -43,6 +74,7 @@ export type GetAllEventListReq = {
|
|
|
43
74
|
namespace?: string
|
|
44
75
|
name?: string
|
|
45
76
|
eventType?: EventType
|
|
77
|
+
kindName?: string
|
|
46
78
|
}
|
|
47
79
|
|
|
48
80
|
export type GetAllEventListRespItemsSource = {
|
|
@@ -102,6 +134,24 @@ export type GetClusterNodeLabelListResp = {
|
|
|
102
134
|
pagination?: CommonCommon.Pagination
|
|
103
135
|
}
|
|
104
136
|
|
|
137
|
+
export type GetClusterPodLabelListReq = {
|
|
138
|
+
page?: number
|
|
139
|
+
pageSize?: number
|
|
140
|
+
searchKey?: string
|
|
141
|
+
filterNamespace?: string
|
|
142
|
+
cluster?: string
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export type GetClusterPodLabelListRespLabel = {
|
|
146
|
+
key?: string
|
|
147
|
+
value?: string[]
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export type GetClusterPodLabelListResp = {
|
|
151
|
+
items?: GetClusterPodLabelListRespLabel[]
|
|
152
|
+
pagination?: CommonCommon.Pagination
|
|
153
|
+
}
|
|
154
|
+
|
|
105
155
|
export type GetClusterNodePortListReq = {
|
|
106
156
|
cluster?: string
|
|
107
157
|
}
|
|
@@ -221,6 +271,9 @@ export class Cluster {
|
|
|
221
271
|
static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
|
|
222
272
|
return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
223
273
|
}
|
|
274
|
+
static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
|
|
275
|
+
return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
276
|
+
}
|
|
224
277
|
static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
|
|
225
278
|
return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
226
279
|
}
|
|
@@ -233,7 +286,13 @@ export class Cluster {
|
|
|
233
286
|
static GetAllEventList(req: GetAllEventListReq, initReq?: fm.InitReq): Promise<GetAllEventListResp> {
|
|
234
287
|
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
288
|
}
|
|
289
|
+
static GetAllEventKindsList(req: GetAllEventKindsListReq, initReq?: fm.InitReq): Promise<GetAllEventKindsListResp> {
|
|
290
|
+
return fm.fetchReq<GetAllEventKindsListReq, GetAllEventKindsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/all-events-kinds?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
291
|
+
}
|
|
236
292
|
static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
|
|
237
293
|
return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
238
294
|
}
|
|
295
|
+
static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
|
|
296
|
+
return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
297
|
+
}
|
|
239
298
|
}
|
package/common.pb.ts
CHANGED
|
@@ -145,10 +145,13 @@ 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[]
|
|
152
155
|
}
|
|
153
156
|
|
|
154
157
|
export type OwnerReference = {
|
|
@@ -162,4 +165,50 @@ export type CommonItemStatus = {
|
|
|
162
165
|
serviceAddresses?: string[]
|
|
163
166
|
webManagerAddress?: string
|
|
164
167
|
webLogAddress?: string
|
|
168
|
+
avgPvAllocatedInGb?: number
|
|
169
|
+
avgPvUsedInGb?: number
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export type AccessWhitelistInternal = {
|
|
173
|
+
namespace?: string
|
|
174
|
+
podSelector?: {[key: string]: string}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export type AccessWhitelistExternal = {
|
|
178
|
+
cidr?: string
|
|
179
|
+
ip?: string
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export type AccessWhitelist = {
|
|
183
|
+
internals?: AccessWhitelistInternal[]
|
|
184
|
+
externals?: AccessWhitelistExternal[]
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export type ContainerStatus = {
|
|
188
|
+
name?: string
|
|
189
|
+
state?: ContainerState
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export type ContainerState = {
|
|
193
|
+
waiting?: ContainerStateWaiting
|
|
194
|
+
running?: ContainerStateRunning
|
|
195
|
+
terminated?: ContainerStateTerminated
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export type ContainerStateWaiting = {
|
|
199
|
+
reason?: string
|
|
200
|
+
message?: string
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export type ContainerStateRunning = {
|
|
204
|
+
startedAt?: string
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export type ContainerStateTerminated = {
|
|
208
|
+
exitCode?: number
|
|
209
|
+
signal?: number
|
|
210
|
+
reason?: string
|
|
211
|
+
message?: string
|
|
212
|
+
startedAt?: string
|
|
213
|
+
finishedAt?: string
|
|
165
214
|
}
|
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",
|
|
@@ -57,10 +99,160 @@ export enum GetPostgresqlPodListRespPodType {
|
|
|
57
99
|
PgAdmin = "PgAdmin",
|
|
58
100
|
}
|
|
59
101
|
|
|
102
|
+
export enum GetPostgresqlPodListRespHealthStatus {
|
|
103
|
+
HealthStatusUnknown = "HealthStatusUnknown",
|
|
104
|
+
HealthStatusHealthy = "HealthStatusHealthy",
|
|
105
|
+
HealthStatusUnhealthy = "HealthStatusUnhealthy",
|
|
106
|
+
}
|
|
107
|
+
|
|
60
108
|
export enum GetPostgresqlConfRespItemsParamType {
|
|
61
109
|
conf = "conf",
|
|
62
110
|
}
|
|
63
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
|
+
|
|
64
256
|
export type GetPostgresqlUsersReq = {
|
|
65
257
|
cluster?: string
|
|
66
258
|
namespace?: string
|
|
@@ -83,6 +275,8 @@ export type GetPostgresqlListReq = {
|
|
|
83
275
|
sortBy?: string
|
|
84
276
|
searchKey?: string
|
|
85
277
|
workspaceId?: number
|
|
278
|
+
filterCluster?: string
|
|
279
|
+
filterNamespace?: string
|
|
86
280
|
}
|
|
87
281
|
|
|
88
282
|
export type GetPostgresqlConfReq = {
|
|
@@ -141,6 +335,7 @@ export type CreatePostgresqlReq = {
|
|
|
141
335
|
pgAdminDefaultEmail?: string
|
|
142
336
|
pgAdminDefaultPassword?: string
|
|
143
337
|
affinity?: CommonCommon.Affinity
|
|
338
|
+
backupConfig?: UpdatePostgresqlBackupConfigReq
|
|
144
339
|
externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
|
|
145
340
|
lbTyp?: CommonCommon.LBTyp
|
|
146
341
|
lbPoolName?: string
|
|
@@ -269,6 +464,7 @@ export type GetPostgresqlPodListRespData = {
|
|
|
269
464
|
createTimestamp?: string
|
|
270
465
|
podType?: GetPostgresqlPodListRespPodType
|
|
271
466
|
replicationLagInBytes?: string
|
|
467
|
+
healthStatus?: GetPostgresqlPodListRespHealthStatus
|
|
272
468
|
common?: CommonCommon.PodCommon
|
|
273
469
|
}
|
|
274
470
|
|
|
@@ -281,6 +477,8 @@ export type GetPostgresqlGrafanaAddrReq = {
|
|
|
281
477
|
cluster?: string
|
|
282
478
|
namespace?: string
|
|
283
479
|
name?: string
|
|
480
|
+
from?: string
|
|
481
|
+
to?: string
|
|
284
482
|
}
|
|
285
483
|
|
|
286
484
|
export type GetPostgresqlGrafanaAddrResp = {
|
|
@@ -318,6 +516,7 @@ export type PostgresqlItemStatus = {
|
|
|
318
516
|
status?: Status
|
|
319
517
|
podsAreReadyNum?: number
|
|
320
518
|
clusterIPs?: string[]
|
|
519
|
+
avgReplicationLagInBytes?: string
|
|
321
520
|
common?: CommonCommon.CommonItemStatus
|
|
322
521
|
}
|
|
323
522
|
|
|
@@ -376,4 +575,25 @@ export class Postgresql {
|
|
|
376
575
|
static GetPostgresqlUsers(req: GetPostgresqlUsersReq, initReq?: fm.InitReq): Promise<GetPostgresqlUsersResp> {
|
|
377
576
|
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"})
|
|
378
577
|
}
|
|
578
|
+
static GetPostgresqlBackupList(req: GetPostgresqlBackupListReq, initReq?: fm.InitReq): Promise<GetPostgresqlBackupListResp> {
|
|
579
|
+
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"})
|
|
580
|
+
}
|
|
581
|
+
static CreatePostgresqlBackup(req: CreatePostgresqlBackupReq, initReq?: fm.InitReq): Promise<CreatePostgresqlBackupResp> {
|
|
582
|
+
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)})
|
|
583
|
+
}
|
|
584
|
+
static DeletePostgresqlBackup(req: DeletePostgresqlBackupReq, initReq?: fm.InitReq): Promise<DeletePostgresqlBackupResp> {
|
|
585
|
+
return fm.fetchReq<DeletePostgresqlBackupReq, DeletePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/backups/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/${req["backupName"]}`, {...initReq, method: "DELETE"})
|
|
586
|
+
}
|
|
587
|
+
static UpdatePostgresqlBackupConfig(req: UpdatePostgresqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlBackupConfigResp> {
|
|
588
|
+
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)})
|
|
589
|
+
}
|
|
590
|
+
static GetPostgresqlS3ConfigList(req: GetPostgresqlS3ConfigListReq, initReq?: fm.InitReq): Promise<GetPostgresqlS3ConfigListResp> {
|
|
591
|
+
return fm.fetchReq<GetPostgresqlS3ConfigListReq, GetPostgresqlS3ConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/s3/configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
592
|
+
}
|
|
593
|
+
static UpdatePostgresqlS3Config(req: UpdatePostgresqlS3ConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlS3ConfigResp> {
|
|
594
|
+
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)})
|
|
595
|
+
}
|
|
596
|
+
static CreateBucketExistChecking(req: CreateBucketExistCheckingReq, initReq?: fm.InitReq): Promise<CreateBucketExistCheckingResp> {
|
|
597
|
+
return fm.fetchReq<CreateBucketExistCheckingReq, CreateBucketExistCheckingResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/s3/config/checking`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
598
|
+
}
|
|
379
599
|
}
|