@daocloud-proto/mcamel-mysql 0.5.0-85 → 0.5.0-852
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/cloudshell.pb.ts +3 -3
- package/cluster.pb.ts +299 -8
- package/common.pb.ts +74 -1
- package/insight.pb.ts +8 -12
- package/metric.pb.ts +12 -1
- package/mysql.pb.ts +152 -34
- package/package.json +1 -1
- package/storage_config.pb.ts +9 -8
- package/template.pb.ts +194 -0
- package/version.pb.ts +8 -1
package/cloudshell.pb.ts
CHANGED
|
@@ -67,12 +67,12 @@ export type GetorDeleteCloudShellRequest = {
|
|
|
67
67
|
|
|
68
68
|
export class CloudShellService {
|
|
69
69
|
static CreateCloudShell(req: CreateCloudShellRequest, initReq?: fm.InitReq): Promise<CloudShell> {
|
|
70
|
-
return fm.fetchReq<CreateCloudShellRequest, CloudShell>(`/apis/mcamel.io/mysql/
|
|
70
|
+
return fm.fetchReq<CreateCloudShellRequest, CloudShell>(`/apis/mcamel.io/mysql/v1alpha2/cloudshells`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
71
71
|
}
|
|
72
72
|
static GetCloudShell(req: GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<CloudShell> {
|
|
73
|
-
return fm.fetchReq<GetorDeleteCloudShellRequest, CloudShell>(`/apis/mcamel.io/mysql/
|
|
73
|
+
return fm.fetchReq<GetorDeleteCloudShellRequest, CloudShell>(`/apis/mcamel.io/mysql/v1alpha2/cloudshells/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
|
|
74
74
|
}
|
|
75
75
|
static DeleteCloudShell(req: GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
76
|
-
return fm.fetchReq<GetorDeleteCloudShellRequest, GoogleProtobufEmpty.Empty>(`/apis/mcamel.io/mysql/
|
|
76
|
+
return fm.fetchReq<GetorDeleteCloudShellRequest, GoogleProtobufEmpty.Empty>(`/apis/mcamel.io/mysql/v1alpha2/cloudshells/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
77
77
|
}
|
|
78
78
|
}
|
package/cluster.pb.ts
CHANGED
|
@@ -7,12 +7,49 @@
|
|
|
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
|
+
ExportTemplate = "ExportTemplate",
|
|
34
|
+
ImportTemplate = "ImportTemplate",
|
|
35
|
+
}
|
|
36
|
+
|
|
10
37
|
export enum EventType {
|
|
11
38
|
EVENT_TYPE_UNSPECIFIED = "EVENT_TYPE_UNSPECIFIED",
|
|
12
39
|
Normal = "Normal",
|
|
13
40
|
Warning = "Warning",
|
|
14
41
|
}
|
|
15
42
|
|
|
43
|
+
export enum InstallFileReqGVR {
|
|
44
|
+
None = "None",
|
|
45
|
+
CustomResourceDefinition = "CustomResourceDefinition",
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export enum GetAllEventListReqSortDir {
|
|
49
|
+
ASC = "ASC",
|
|
50
|
+
DESC = "DESC",
|
|
51
|
+
}
|
|
52
|
+
|
|
16
53
|
export enum GetEventListReqKind {
|
|
17
54
|
KIND_UNSPECIFIED = "KIND_UNSPECIFIED",
|
|
18
55
|
Pod = "Pod",
|
|
@@ -23,11 +60,157 @@ export enum GetWorkspaceListReqSortDir {
|
|
|
23
60
|
DESC = "DESC",
|
|
24
61
|
}
|
|
25
62
|
|
|
63
|
+
export enum ClusterItemNetworkMode {
|
|
64
|
+
Unknown = "Unknown",
|
|
65
|
+
Flannel = "Flannel",
|
|
66
|
+
Calico = "Calico",
|
|
67
|
+
}
|
|
68
|
+
|
|
26
69
|
export enum GetInsightAgentStatusRespInsightAgentStatus {
|
|
27
70
|
NotInstall = "NotInstall",
|
|
28
71
|
Install = "Install",
|
|
29
72
|
}
|
|
30
73
|
|
|
74
|
+
export type InstallFileReq = {
|
|
75
|
+
cluster?: string
|
|
76
|
+
path?: string
|
|
77
|
+
gvr?: InstallFileReqGVR
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type InstallFileResp = {
|
|
81
|
+
message?: string
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type GetInstallVersionReq = {
|
|
85
|
+
cluster?: string
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type GetInstallVersionRespSupportVersion = {
|
|
89
|
+
minVersion?: string
|
|
90
|
+
maxVersion?: string
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export type GetInstallVersionRespStatus = {
|
|
94
|
+
inRange?: boolean
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type GetInstallVersionResp = {
|
|
98
|
+
clusterVersion?: string
|
|
99
|
+
supportVersion?: GetInstallVersionRespSupportVersion
|
|
100
|
+
status?: GetInstallVersionRespStatus
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export type RestartInstanceReq = {
|
|
104
|
+
workspaceId?: number
|
|
105
|
+
cluster?: string
|
|
106
|
+
namespace?: string
|
|
107
|
+
name?: string
|
|
108
|
+
extra?: string
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type RestartInstanceResp = {
|
|
112
|
+
message?: string
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export type GetPermissionsListReq = {
|
|
116
|
+
workspaceId?: number
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type GetPermissionsListRespPermissions = {
|
|
120
|
+
getInstance?: boolean
|
|
121
|
+
createInstance?: boolean
|
|
122
|
+
updateInstance?: boolean
|
|
123
|
+
deleteInstance?: boolean
|
|
124
|
+
getMetric?: boolean
|
|
125
|
+
getInstanceLog?: boolean
|
|
126
|
+
getConfig?: boolean
|
|
127
|
+
updateConfig?: boolean
|
|
128
|
+
getBackup?: boolean
|
|
129
|
+
createBackup?: boolean
|
|
130
|
+
updateBackup?: boolean
|
|
131
|
+
deleteBackup?: boolean
|
|
132
|
+
getBackupConf?: boolean
|
|
133
|
+
createBackupConf?: boolean
|
|
134
|
+
updateBackupConf?: boolean
|
|
135
|
+
deleteBackupConf?: boolean
|
|
136
|
+
getTemplate?: boolean
|
|
137
|
+
createTemplate?: boolean
|
|
138
|
+
updateTemplate?: boolean
|
|
139
|
+
deleteTemplate?: boolean
|
|
140
|
+
getUserPassword?: boolean
|
|
141
|
+
exportTemplate?: boolean
|
|
142
|
+
importTemplate?: boolean
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export type GetPermissionsListResp = {
|
|
146
|
+
permissionsBool?: GetPermissionsListRespPermissions
|
|
147
|
+
permissions?: PermissionsType[]
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export type GetAllEventKindsListResp = {
|
|
151
|
+
data?: string[]
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export type GetAllEventKindsListReq = {
|
|
155
|
+
cluster?: string
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export type GetAllEventListReq = {
|
|
159
|
+
page?: number
|
|
160
|
+
pageSize?: number
|
|
161
|
+
sortDir?: GetAllEventListReqSortDir
|
|
162
|
+
sortBy?: string
|
|
163
|
+
searchKey?: string
|
|
164
|
+
cluster?: string
|
|
165
|
+
namespace?: string
|
|
166
|
+
name?: string
|
|
167
|
+
eventType?: EventType
|
|
168
|
+
kindName?: string
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export type GetAllEventListRespItemsSource = {
|
|
172
|
+
component?: string
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export type GetAllEventListRespItemsMetadata = {
|
|
176
|
+
uid?: string
|
|
177
|
+
name?: string
|
|
178
|
+
namespace?: string
|
|
179
|
+
annotations?: {[key: string]: string}
|
|
180
|
+
resourceVersion?: string
|
|
181
|
+
creationTimestamp?: string
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export type GetAllEventListRespItemsInvolvedObject = {
|
|
185
|
+
uid?: string
|
|
186
|
+
kind?: string
|
|
187
|
+
name?: string
|
|
188
|
+
namespace?: string
|
|
189
|
+
apiVersion?: string
|
|
190
|
+
resourceVersion?: string
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export type GetAllEventListRespItems = {
|
|
194
|
+
kind?: string
|
|
195
|
+
type?: string
|
|
196
|
+
count?: number
|
|
197
|
+
reason?: string
|
|
198
|
+
source?: GetAllEventListRespItemsSource
|
|
199
|
+
message?: string
|
|
200
|
+
metadata?: GetAllEventListRespItemsMetadata
|
|
201
|
+
apiVersion?: string
|
|
202
|
+
lastTimestamp?: string
|
|
203
|
+
firstTimestamp?: string
|
|
204
|
+
involvedObject?: GetAllEventListRespItemsInvolvedObject
|
|
205
|
+
reportingInstance?: string
|
|
206
|
+
reportingComponent?: string
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export type GetAllEventListResp = {
|
|
210
|
+
items?: GetAllEventListRespItems[]
|
|
211
|
+
pagination?: CommonCommon.Pagination
|
|
212
|
+
}
|
|
213
|
+
|
|
31
214
|
export type GetClusterNodeLabelListReq = {
|
|
32
215
|
cluster?: string
|
|
33
216
|
}
|
|
@@ -37,8 +220,32 @@ export type GetClusterNodeLabelListRespLabel = {
|
|
|
37
220
|
value?: string[]
|
|
38
221
|
}
|
|
39
222
|
|
|
223
|
+
export type GetClusterNodeLabelListRespNode2Label = {
|
|
224
|
+
nodeName?: string
|
|
225
|
+
label?: GetClusterNodeLabelListRespLabel[]
|
|
226
|
+
}
|
|
227
|
+
|
|
40
228
|
export type GetClusterNodeLabelListResp = {
|
|
41
229
|
items?: GetClusterNodeLabelListRespLabel[]
|
|
230
|
+
items1?: GetClusterNodeLabelListRespNode2Label[]
|
|
231
|
+
pagination?: CommonCommon.Pagination
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export type GetClusterPodLabelListReq = {
|
|
235
|
+
page?: number
|
|
236
|
+
pageSize?: number
|
|
237
|
+
searchKey?: string
|
|
238
|
+
filterNamespace?: string
|
|
239
|
+
cluster?: string
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export type GetClusterPodLabelListRespLabel = {
|
|
243
|
+
key?: string
|
|
244
|
+
value?: string[]
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export type GetClusterPodLabelListResp = {
|
|
248
|
+
items?: GetClusterPodLabelListRespLabel[]
|
|
42
249
|
pagination?: CommonCommon.Pagination
|
|
43
250
|
}
|
|
44
251
|
|
|
@@ -114,6 +321,7 @@ export type GetWorkspaceListReq = {
|
|
|
114
321
|
export type GetWorkspaceListRespItem = {
|
|
115
322
|
workspaceId?: number
|
|
116
323
|
alias?: string
|
|
324
|
+
visible?: boolean
|
|
117
325
|
}
|
|
118
326
|
|
|
119
327
|
export type GetWorkspaceListResp = {
|
|
@@ -121,15 +329,39 @@ export type GetWorkspaceListResp = {
|
|
|
121
329
|
pagination?: CommonCommon.Pagination
|
|
122
330
|
}
|
|
123
331
|
|
|
332
|
+
export type GetClusterHostnetworkPortsReq = {
|
|
333
|
+
workspaceId?: number
|
|
334
|
+
cluster?: string
|
|
335
|
+
}
|
|
336
|
+
|
|
124
337
|
export type GetClusterListReq = {
|
|
125
338
|
workspaceId?: number
|
|
339
|
+
searchKey?: string
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export type GetClusterHostnetworkPortsResp = {
|
|
343
|
+
items?: number[]
|
|
126
344
|
}
|
|
127
345
|
|
|
128
346
|
export type GetClusterListResp = {
|
|
129
347
|
items?: string[]
|
|
348
|
+
clusters?: ClusterItem[]
|
|
130
349
|
pagination?: CommonCommon.Pagination
|
|
131
350
|
}
|
|
132
351
|
|
|
352
|
+
export type ClusterItemMetadata = {
|
|
353
|
+
name?: string
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export type ClusterItemStatus = {
|
|
357
|
+
networkMode?: ClusterItemNetworkMode[]
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export type ClusterItem = {
|
|
361
|
+
metadata?: ClusterItemMetadata
|
|
362
|
+
status?: ClusterItemStatus
|
|
363
|
+
}
|
|
364
|
+
|
|
133
365
|
export type GetClusterNamespaceListReq = {
|
|
134
366
|
workspaceId?: number
|
|
135
367
|
cluster?: string
|
|
@@ -137,6 +369,7 @@ export type GetClusterNamespaceListReq = {
|
|
|
137
369
|
|
|
138
370
|
export type GetClusterNamespaceListResp = {
|
|
139
371
|
items?: string[]
|
|
372
|
+
disableItems?: string[]
|
|
140
373
|
pagination?: CommonCommon.Pagination
|
|
141
374
|
}
|
|
142
375
|
|
|
@@ -146,31 +379,89 @@ export type GetInsightAgentStatusReq = {
|
|
|
146
379
|
|
|
147
380
|
export type GetInsightAgentStatusResp = {
|
|
148
381
|
status?: GetInsightAgentStatusRespInsightAgentStatus
|
|
382
|
+
clusterStatus?: CommonCommon.ClusterStatus
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export type GetResourceQuotaReq = {
|
|
386
|
+
cluster?: string
|
|
387
|
+
namespace?: string
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export type GetResourceQuotaRespMetadata = {
|
|
391
|
+
uid?: string
|
|
392
|
+
name?: string
|
|
393
|
+
namespace?: string
|
|
394
|
+
annotations?: {[key: string]: string}
|
|
395
|
+
resourceVersion?: string
|
|
396
|
+
creationTimestamp?: string
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export type GetResourceQuotaRespSpec = {
|
|
400
|
+
hard?: {[key: string]: string}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export type GetResourceQuotaRespStatus = {
|
|
404
|
+
hard?: {[key: string]: string}
|
|
405
|
+
used?: {[key: string]: string}
|
|
406
|
+
available?: {[key: string]: string}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export type GetResourceQuotaResp = {
|
|
410
|
+
metadata?: GetResourceQuotaRespMetadata
|
|
411
|
+
spec?: GetResourceQuotaRespSpec
|
|
412
|
+
status?: GetResourceQuotaRespStatus
|
|
149
413
|
}
|
|
150
414
|
|
|
151
415
|
export class Cluster {
|
|
152
416
|
static GetClusterList(req: GetClusterListReq, initReq?: fm.InitReq): Promise<GetClusterListResp> {
|
|
153
|
-
return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/mysql/
|
|
417
|
+
return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
418
|
+
}
|
|
419
|
+
static GetClusterHostnetworkPorts(req: GetClusterHostnetworkPortsReq, initReq?: fm.InitReq): Promise<GetClusterHostnetworkPortsResp> {
|
|
420
|
+
return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/hostnetwork-ports?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
154
421
|
}
|
|
155
422
|
static GetClusterNamespaceList(req: GetClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetClusterNamespaceListResp> {
|
|
156
|
-
return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/mysql/
|
|
423
|
+
return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
|
|
157
424
|
}
|
|
158
425
|
static GetClusterNodePortList(req: GetClusterNodePortListReq, initReq?: fm.InitReq): Promise<GetClusterNodePortListResp> {
|
|
159
|
-
return fm.fetchReq<GetClusterNodePortListReq, GetClusterNodePortListResp>(`/apis/mcamel.io/mysql/
|
|
426
|
+
return fm.fetchReq<GetClusterNodePortListReq, GetClusterNodePortListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/nodeports?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
160
427
|
}
|
|
161
428
|
static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
|
|
162
|
-
return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/mysql/
|
|
429
|
+
return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
430
|
+
}
|
|
431
|
+
static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
|
|
432
|
+
return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
163
433
|
}
|
|
164
434
|
static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
|
|
165
|
-
return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/mysql/
|
|
435
|
+
return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/mysql/v1alpha2/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
166
436
|
}
|
|
167
437
|
static GetInsightAgentStatus(req: GetInsightAgentStatusReq, initReq?: fm.InitReq): Promise<GetInsightAgentStatusResp> {
|
|
168
|
-
return fm.fetchReq<GetInsightAgentStatusReq, GetInsightAgentStatusResp>(`/apis/mcamel.io/mysql/
|
|
438
|
+
return fm.fetchReq<GetInsightAgentStatusReq, GetInsightAgentStatusResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/insight/status?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
169
439
|
}
|
|
170
440
|
static GetEventList(req: GetEventListReq, initReq?: fm.InitReq): Promise<GetEventListResp> {
|
|
171
|
-
return fm.fetchReq<GetEventListReq, GetEventListResp>(`/apis/mcamel.io/mysql/
|
|
441
|
+
return fm.fetchReq<GetEventListReq, GetEventListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/events?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
442
|
+
}
|
|
443
|
+
static GetAllEventList(req: GetAllEventListReq, initReq?: fm.InitReq): Promise<GetAllEventListResp> {
|
|
444
|
+
return fm.fetchReq<GetAllEventListReq, GetAllEventListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/all-events?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
445
|
+
}
|
|
446
|
+
static GetAllEventKindsList(req: GetAllEventKindsListReq, initReq?: fm.InitReq): Promise<GetAllEventKindsListResp> {
|
|
447
|
+
return fm.fetchReq<GetAllEventKindsListReq, GetAllEventKindsListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/all-events-kinds?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
172
448
|
}
|
|
173
449
|
static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
|
|
174
|
-
return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/mysql/
|
|
450
|
+
return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
451
|
+
}
|
|
452
|
+
static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
|
|
453
|
+
return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
454
|
+
}
|
|
455
|
+
static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
|
|
456
|
+
return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
457
|
+
}
|
|
458
|
+
static InstallFile(req: InstallFileReq, initReq?: fm.InitReq): Promise<InstallFileResp> {
|
|
459
|
+
return fm.fetchReq<InstallFileReq, InstallFileResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/install-file`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
460
|
+
}
|
|
461
|
+
static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
|
|
462
|
+
return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
463
|
+
}
|
|
464
|
+
static GetResourceQuota(req: GetResourceQuotaReq, initReq?: fm.InitReq): Promise<GetResourceQuotaResp> {
|
|
465
|
+
return fm.fetchReq<GetResourceQuotaReq, GetResourceQuotaResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/resourcequota?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
175
466
|
}
|
|
176
467
|
}
|
package/common.pb.ts
CHANGED
|
@@ -10,7 +10,7 @@ export enum ExternalTrafficPolicy {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export enum LBTyp {
|
|
13
|
-
|
|
13
|
+
MetalLB = "MetalLB",
|
|
14
14
|
Others = "Others",
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -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",
|
|
@@ -40,6 +50,14 @@ export enum PodCommonConditionStatus {
|
|
|
40
50
|
PodConditionStatusFalse = "PodConditionStatusFalse",
|
|
41
51
|
}
|
|
42
52
|
|
|
53
|
+
export enum PodCommonFilterPodStatus {
|
|
54
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
55
|
+
RUNNING = "RUNNING",
|
|
56
|
+
ERROR = "ERROR",
|
|
57
|
+
COMPLETED = "COMPLETED",
|
|
58
|
+
WAITING = "WAITING",
|
|
59
|
+
}
|
|
60
|
+
|
|
43
61
|
export type Affinity = {
|
|
44
62
|
nodeAffinity?: NodeAffinity
|
|
45
63
|
podAffinity?: PodAffinity
|
|
@@ -145,9 +163,15 @@ export type PodCommon = {
|
|
|
145
163
|
cpuLimit?: number
|
|
146
164
|
memoryUsage?: number
|
|
147
165
|
memoryLimit?: number
|
|
166
|
+
pvUsedInGb?: number
|
|
167
|
+
pvAllocatedInGb?: number
|
|
148
168
|
conditions?: PodCommonCondition[]
|
|
149
169
|
containersName?: string[]
|
|
150
170
|
ownerReference?: OwnerReference[]
|
|
171
|
+
initContainersName?: string[]
|
|
172
|
+
initContainersStatuses?: ContainerStatus[]
|
|
173
|
+
containersStatuses?: ContainerStatus[]
|
|
174
|
+
podStatus?: string
|
|
151
175
|
}
|
|
152
176
|
|
|
153
177
|
export type OwnerReference = {
|
|
@@ -161,4 +185,53 @@ export type CommonItemStatus = {
|
|
|
161
185
|
serviceAddresses?: string[]
|
|
162
186
|
webManagerAddress?: string
|
|
163
187
|
webLogAddress?: string
|
|
188
|
+
avgPvAllocatedInGb?: number
|
|
189
|
+
avgPvUsedInGb?: number
|
|
190
|
+
cpuUtilization?: number
|
|
191
|
+
memoryUtilization?: number
|
|
192
|
+
clusterStatus?: ClusterStatus
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export type AccessWhitelistInternal = {
|
|
196
|
+
namespace?: string
|
|
197
|
+
podSelector?: {[key: string]: string}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export type AccessWhitelistExternal = {
|
|
201
|
+
cidr?: string
|
|
202
|
+
ip?: string
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export type AccessWhitelist = {
|
|
206
|
+
internals?: AccessWhitelistInternal[]
|
|
207
|
+
externals?: AccessWhitelistExternal[]
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export type ContainerStatus = {
|
|
211
|
+
name?: string
|
|
212
|
+
state?: ContainerState
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export type ContainerState = {
|
|
216
|
+
waiting?: ContainerStateWaiting
|
|
217
|
+
running?: ContainerStateRunning
|
|
218
|
+
terminated?: ContainerStateTerminated
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export type ContainerStateWaiting = {
|
|
222
|
+
reason?: string
|
|
223
|
+
message?: string
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export type ContainerStateRunning = {
|
|
227
|
+
startedAt?: string
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export type ContainerStateTerminated = {
|
|
231
|
+
exitCode?: number
|
|
232
|
+
signal?: number
|
|
233
|
+
reason?: string
|
|
234
|
+
message?: string
|
|
235
|
+
startedAt?: string
|
|
236
|
+
finishedAt?: string
|
|
164
237
|
}
|
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/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
|
|
@@ -20,6 +31,6 @@ export type GetAlertsListResp = {
|
|
|
20
31
|
|
|
21
32
|
export class Metric {
|
|
22
33
|
static GetAlertsList(req: GetAlertsListReq, initReq?: fm.InitReq): Promise<GetAlertsListResp> {
|
|
23
|
-
return fm.fetchReq<GetAlertsListReq, GetAlertsListResp>(`/apis/mcamel.io/mysql/
|
|
34
|
+
return fm.fetchReq<GetAlertsListReq, GetAlertsListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/alerts?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
24
35
|
}
|
|
25
36
|
}
|
package/mysql.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> =
|
|
@@ -16,10 +17,43 @@ type OneOf<T> =
|
|
|
16
17
|
: never)
|
|
17
18
|
: never);
|
|
18
19
|
|
|
20
|
+
export enum RoleType {
|
|
21
|
+
Unknown = "Unknown",
|
|
22
|
+
Master = "Master",
|
|
23
|
+
Replica = "Replica",
|
|
24
|
+
PRIMARY = "PRIMARY",
|
|
25
|
+
SECONDARY = "SECONDARY",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export enum PodStatus {
|
|
29
|
+
PodStatus_UNSPECIFIED = "PodStatus_UNSPECIFIED",
|
|
30
|
+
PodStatus_Unknown = "PodStatus_Unknown",
|
|
31
|
+
PodStatus_Pending = "PodStatus_Pending",
|
|
32
|
+
PodStatus_Running = "PodStatus_Running",
|
|
33
|
+
PodStatus_Succeeded = "PodStatus_Succeeded",
|
|
34
|
+
PodStatus_Failed = "PodStatus_Failed",
|
|
35
|
+
PodStatus_Terminating = "PodStatus_Terminating",
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export enum InstanceType {
|
|
39
|
+
UnKnown = "UnKnown",
|
|
40
|
+
SingleNode = "SingleNode",
|
|
41
|
+
MasterSlave = "MasterSlave",
|
|
42
|
+
Mgr = "Mgr",
|
|
43
|
+
}
|
|
44
|
+
|
|
19
45
|
export enum Status {
|
|
20
46
|
Failed = "Failed",
|
|
21
47
|
Running = "Running",
|
|
22
48
|
Creating = "Creating",
|
|
49
|
+
MgrOnline = "MgrOnline",
|
|
50
|
+
MgrRecovering = "MgrRecovering",
|
|
51
|
+
MgrError = "MgrError",
|
|
52
|
+
MgrOffline = "MgrOffline",
|
|
53
|
+
MgrNotManaged = "MgrNotManaged",
|
|
54
|
+
MgrUnmanaged = "MgrUnmanaged",
|
|
55
|
+
MgrUnreachable = "MgrUnreachable",
|
|
56
|
+
MgrUnknown = "MgrUnknown",
|
|
23
57
|
}
|
|
24
58
|
|
|
25
59
|
export enum GetMinioListReqSortDir {
|
|
@@ -107,12 +141,69 @@ export enum GetMysqlNodeListRespNodeType {
|
|
|
107
141
|
Master = "Master",
|
|
108
142
|
Replica = "Replica",
|
|
109
143
|
PhpAdmin = "PhpAdmin",
|
|
144
|
+
PRIMARY = "PRIMARY",
|
|
145
|
+
SECONDARY = "SECONDARY",
|
|
110
146
|
}
|
|
111
147
|
|
|
112
148
|
export enum GetMysqlConfRespItemsParamType {
|
|
113
149
|
conf = "conf",
|
|
114
150
|
}
|
|
115
151
|
|
|
152
|
+
export enum MysqlClusterItemStatusRestoreInitialStatus {
|
|
153
|
+
Unknown = "Unknown",
|
|
154
|
+
Running = "Running",
|
|
155
|
+
Failed = "Failed",
|
|
156
|
+
Succeeded = "Succeeded",
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export type GetTopologyRequest = {
|
|
160
|
+
cluster?: string
|
|
161
|
+
namespace?: string
|
|
162
|
+
name?: string
|
|
163
|
+
instanceType?: InstanceType
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type GetTopologyResp = {
|
|
167
|
+
cluster?: string
|
|
168
|
+
namespace?: string
|
|
169
|
+
name?: string
|
|
170
|
+
instanceType?: InstanceType
|
|
171
|
+
version?: string
|
|
172
|
+
storageClassName?: string
|
|
173
|
+
storageCapacity?: string
|
|
174
|
+
nodes?: Node[]
|
|
175
|
+
edges?: Edge[]
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export type Edge = {
|
|
179
|
+
source?: string
|
|
180
|
+
target?: string
|
|
181
|
+
properties?: Property
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export type Property = {
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export type Node = {
|
|
188
|
+
serverUuid?: string
|
|
189
|
+
upstreamServerUuid?: string
|
|
190
|
+
role?: RoleType
|
|
191
|
+
podName?: string
|
|
192
|
+
ip?: string
|
|
193
|
+
podStatus?: PodStatus
|
|
194
|
+
status?: Status
|
|
195
|
+
cpuLimit?: string
|
|
196
|
+
cpuRequest?: string
|
|
197
|
+
memoryLimit?: string
|
|
198
|
+
memoryRequest?: string
|
|
199
|
+
totalContainer?: number
|
|
200
|
+
totalContainerReady?: number
|
|
201
|
+
gtidPurged?: string
|
|
202
|
+
gtidExecuted?: string
|
|
203
|
+
lagBehindUpstream?: string
|
|
204
|
+
error?: string
|
|
205
|
+
}
|
|
206
|
+
|
|
116
207
|
export type GetMinioListReq = {
|
|
117
208
|
page?: number
|
|
118
209
|
pageSize?: number
|
|
@@ -148,6 +239,7 @@ export type GetMysqlUsersReq = {
|
|
|
148
239
|
cluster?: string
|
|
149
240
|
namespace?: string
|
|
150
241
|
name?: string
|
|
242
|
+
instanceType?: InstanceType
|
|
151
243
|
}
|
|
152
244
|
|
|
153
245
|
export type GetMysqlUsersRespUserItem = {
|
|
@@ -172,6 +264,7 @@ export type UpdateMysqlBackupConfigReq = {
|
|
|
172
264
|
storageConfigName?: string
|
|
173
265
|
storageConfigNamespace?: string
|
|
174
266
|
storageConfigCluster?: string
|
|
267
|
+
instanceType?: InstanceType
|
|
175
268
|
}
|
|
176
269
|
|
|
177
270
|
export type UpdateMysqlBackupConfigResp = {
|
|
@@ -185,6 +278,9 @@ export type CreateMysqlRecoverReq = {
|
|
|
185
278
|
name?: string
|
|
186
279
|
backupName?: string
|
|
187
280
|
targetMysqlClusterName?: string
|
|
281
|
+
targetMysqlClusterNamespace?: string
|
|
282
|
+
targetMysqlClusterCluster?: string
|
|
283
|
+
instanceType?: InstanceType
|
|
188
284
|
}
|
|
189
285
|
|
|
190
286
|
export type CreateMysqlRecoverResp = {
|
|
@@ -200,6 +296,7 @@ export type GetMysqlBackupListReq = {
|
|
|
200
296
|
cluster?: string
|
|
201
297
|
namespace?: string
|
|
202
298
|
name?: string
|
|
299
|
+
instanceType?: InstanceType
|
|
203
300
|
}
|
|
204
301
|
|
|
205
302
|
export type GetMysqlBackupJobListReq = {
|
|
@@ -310,6 +407,7 @@ export type CreateMysqlBackupReq = {
|
|
|
310
407
|
backupName?: string
|
|
311
408
|
backupBucket?: string
|
|
312
409
|
backupBucketSubPath?: string
|
|
410
|
+
instanceType?: InstanceType
|
|
313
411
|
}
|
|
314
412
|
|
|
315
413
|
export type CreateMysqlBackupResp = {
|
|
@@ -324,10 +422,12 @@ export type DeleteMysqlBackupReq = {
|
|
|
324
422
|
cluster?: string
|
|
325
423
|
namespace?: string
|
|
326
424
|
name?: string
|
|
425
|
+
instanceType?: InstanceType
|
|
327
426
|
}
|
|
328
427
|
|
|
329
428
|
export type DeleteMysqlBackupResp = {
|
|
330
429
|
message?: string
|
|
430
|
+
instanceType?: InstanceType
|
|
331
431
|
}
|
|
332
432
|
|
|
333
433
|
export type GetMysqlListReq = {
|
|
@@ -337,6 +437,8 @@ export type GetMysqlListReq = {
|
|
|
337
437
|
sortBy?: string
|
|
338
438
|
searchKey?: string
|
|
339
439
|
workspaceId?: number
|
|
440
|
+
filterCluster?: string
|
|
441
|
+
filterNamespace?: string
|
|
340
442
|
}
|
|
341
443
|
|
|
342
444
|
export type GetMysqlConfReq = {
|
|
@@ -348,6 +450,7 @@ export type GetMysqlConfReq = {
|
|
|
348
450
|
cluster?: string
|
|
349
451
|
namespace?: string
|
|
350
452
|
name?: string
|
|
453
|
+
instanceType?: InstanceType
|
|
351
454
|
}
|
|
352
455
|
|
|
353
456
|
export type GetMysqlParamReq = {
|
|
@@ -370,6 +473,7 @@ export type CreateMysqlReq = {
|
|
|
370
473
|
describe?: string
|
|
371
474
|
version?: string
|
|
372
475
|
replicas?: number
|
|
476
|
+
instanceType?: InstanceType
|
|
373
477
|
storageClassName?: string
|
|
374
478
|
storageCapacity?: string
|
|
375
479
|
rootPassword?: string
|
|
@@ -381,6 +485,7 @@ export type CreateMysqlReq = {
|
|
|
381
485
|
memoryRequest?: string
|
|
382
486
|
memoryLimit?: string
|
|
383
487
|
conf?: string
|
|
488
|
+
confTemplateName?: string
|
|
384
489
|
backupSchedule?: string
|
|
385
490
|
backupSecretName?: string
|
|
386
491
|
backupBucket?: string
|
|
@@ -402,17 +507,25 @@ export type CreateMysqlReq = {
|
|
|
402
507
|
storageConfigNamespace?: string
|
|
403
508
|
storageConfigCluster?: string
|
|
404
509
|
affinity?: CommonCommon.Affinity
|
|
510
|
+
serviceMonitorInterval?: string
|
|
511
|
+
accessWhitelist?: CommonCommon.AccessWhitelist
|
|
405
512
|
externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
|
|
406
513
|
lbTyp?: CommonCommon.LBTyp
|
|
407
514
|
lbPoolName?: string
|
|
408
515
|
lbAddress?: string
|
|
516
|
+
phpAdminExternalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
|
|
517
|
+
phpAdminLbTyp?: CommonCommon.LBTyp
|
|
518
|
+
phpAdminLbPoolName?: string
|
|
519
|
+
phpAdminLbAddress?: string
|
|
409
520
|
}
|
|
410
521
|
|
|
411
522
|
export type UpdateMysqlConfReq = {
|
|
412
523
|
cluster?: string
|
|
413
524
|
namespace?: string
|
|
414
525
|
name?: string
|
|
415
|
-
|
|
526
|
+
confItems?: TemplateTemplate.TemplateConfigItem[]
|
|
527
|
+
reloadFromConfTemplateName?: string
|
|
528
|
+
instanceType?: InstanceType
|
|
416
529
|
}
|
|
417
530
|
|
|
418
531
|
export type UpdateMysqlParamsResp = {
|
|
@@ -427,13 +540,6 @@ export type GetMysqlParamRespSelectDataStringValue = {
|
|
|
427
540
|
value?: string
|
|
428
541
|
}
|
|
429
542
|
|
|
430
|
-
export type GetMysqlParamRespSelectDataResourceValue = {
|
|
431
|
-
cpuRequest?: string
|
|
432
|
-
cpuLimit?: string
|
|
433
|
-
memoryRequest?: string
|
|
434
|
-
memoryLimit?: string
|
|
435
|
-
}
|
|
436
|
-
|
|
437
543
|
export type GetMysqlParamRespSelectDataIntValue = {
|
|
438
544
|
value?: number
|
|
439
545
|
}
|
|
@@ -448,7 +554,7 @@ type BaseGetMysqlParamRespSelectData = {
|
|
|
448
554
|
}
|
|
449
555
|
|
|
450
556
|
export type GetMysqlParamRespSelectData = BaseGetMysqlParamRespSelectData
|
|
451
|
-
& OneOf<{ sValue: GetMysqlParamRespSelectDataStringValue;
|
|
557
|
+
& OneOf<{ sValue: GetMysqlParamRespSelectDataStringValue; iValue: GetMysqlParamRespSelectDataIntValue; scValue: GetMysqlParamRespSelectDataStorageClassValue }>
|
|
452
558
|
|
|
453
559
|
export type GetMysqlParamRespSelect = {
|
|
454
560
|
selectType?: GetMysqlParamRespSelectSelectType
|
|
@@ -458,10 +564,10 @@ export type GetMysqlParamRespSelect = {
|
|
|
458
564
|
export type GetMysqlParamResp = {
|
|
459
565
|
version?: GetMysqlParamRespSelect
|
|
460
566
|
replicas?: GetMysqlParamRespSelect
|
|
461
|
-
resource?: GetMysqlParamRespSelect
|
|
462
567
|
storage?: GetMysqlParamRespSelect
|
|
463
568
|
cnf?: GetMysqlParamRespSelect
|
|
464
569
|
eightXcnf?: GetMysqlParamRespSelect
|
|
570
|
+
mgrVersion?: GetMysqlParamRespSelect
|
|
465
571
|
}
|
|
466
572
|
|
|
467
573
|
export type GetMysqlBackupProviderListResp = {
|
|
@@ -473,12 +579,14 @@ export type CreateMysqlResp = {
|
|
|
473
579
|
}
|
|
474
580
|
|
|
475
581
|
export type GetMysqlOperatorVersionListReq = {
|
|
582
|
+
cluster?: string
|
|
476
583
|
}
|
|
477
584
|
|
|
478
585
|
export type GetMysqlOperatorVersionListRespGetMysqlOperatorVersionListData = {
|
|
479
586
|
cluster?: string
|
|
480
587
|
namespace?: string
|
|
481
588
|
version?: string
|
|
589
|
+
instanceType?: InstanceType[]
|
|
482
590
|
}
|
|
483
591
|
|
|
484
592
|
export type GetMysqlOperatorVersionListResp = {
|
|
@@ -490,6 +598,7 @@ export type DeleteMysqlReq = {
|
|
|
490
598
|
cluster?: string
|
|
491
599
|
namespace?: string
|
|
492
600
|
name?: string
|
|
601
|
+
instanceType?: InstanceType
|
|
493
602
|
}
|
|
494
603
|
|
|
495
604
|
export type DeleteMysqlsReq = {
|
|
@@ -513,6 +622,7 @@ export type GetMysqlNodeListReq = {
|
|
|
513
622
|
sortDir?: GetMysqlNodeListReqSortDir
|
|
514
623
|
sortBy?: string
|
|
515
624
|
searchKey?: string
|
|
625
|
+
instanceType?: InstanceType
|
|
516
626
|
}
|
|
517
627
|
|
|
518
628
|
export type GetMysqlNodeListRespData = {
|
|
@@ -539,6 +649,9 @@ export type GetMysqlGrafanaAddrReq = {
|
|
|
539
649
|
cluster?: string
|
|
540
650
|
namespace?: string
|
|
541
651
|
name?: string
|
|
652
|
+
from?: string
|
|
653
|
+
to?: string
|
|
654
|
+
instanceType?: InstanceType
|
|
542
655
|
}
|
|
543
656
|
|
|
544
657
|
export type GetMysqlGrafanaAddrResp = {
|
|
@@ -549,6 +662,7 @@ export type GetMysqlReq = {
|
|
|
549
662
|
cluster?: string
|
|
550
663
|
namespace?: string
|
|
551
664
|
name?: string
|
|
665
|
+
instanceType?: InstanceType
|
|
552
666
|
}
|
|
553
667
|
|
|
554
668
|
export type GetMysqlResp = {
|
|
@@ -584,6 +698,7 @@ export type MysqlClusterItemStatus = {
|
|
|
584
698
|
secondsBehindMaster?: number
|
|
585
699
|
cpuUtilization?: number
|
|
586
700
|
memoryUtilization?: number
|
|
701
|
+
restoreInitialStatus?: MysqlClusterItemStatusRestoreInitialStatus
|
|
587
702
|
}
|
|
588
703
|
|
|
589
704
|
export type MysqlClusterItemMetadata = {
|
|
@@ -601,74 +716,77 @@ export type MysqlClusterItem = {
|
|
|
601
716
|
status?: MysqlClusterItemStatus
|
|
602
717
|
}
|
|
603
718
|
|
|
604
|
-
export class
|
|
719
|
+
export class MysqlMgr {
|
|
605
720
|
static GetMysqlList(req: GetMysqlListReq, initReq?: fm.InitReq): Promise<GetMysqlListResp> {
|
|
606
|
-
return fm.fetchReq<GetMysqlListReq, GetMysqlListResp>(`/apis/mcamel.io/mysql/
|
|
721
|
+
return fm.fetchReq<GetMysqlListReq, GetMysqlListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/mysqls?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
607
722
|
}
|
|
608
723
|
static GetMysqlOperatorVersionList(req: GetMysqlOperatorVersionListReq, initReq?: fm.InitReq): Promise<GetMysqlOperatorVersionListResp> {
|
|
609
|
-
return fm.fetchReq<GetMysqlOperatorVersionListReq, GetMysqlOperatorVersionListResp>(`/apis/mcamel.io/mysql/
|
|
724
|
+
return fm.fetchReq<GetMysqlOperatorVersionListReq, GetMysqlOperatorVersionListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/mysql-operator/versions?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
610
725
|
}
|
|
611
726
|
static GetMysql(req: GetMysqlReq, initReq?: fm.InitReq): Promise<GetMysqlResp> {
|
|
612
|
-
return fm.fetchReq<GetMysqlReq, GetMysqlResp>(`/apis/mcamel.io/mysql/
|
|
727
|
+
return fm.fetchReq<GetMysqlReq, GetMysqlResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
613
728
|
}
|
|
614
729
|
static GetMysqlParam(req: GetMysqlParamReq, initReq?: fm.InitReq): Promise<GetMysqlParamResp> {
|
|
615
|
-
return fm.fetchReq<GetMysqlParamReq, GetMysqlParamResp>(`/apis/mcamel.io/mysql/
|
|
730
|
+
return fm.fetchReq<GetMysqlParamReq, GetMysqlParamResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql-params/${req["cluster"]}?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
616
731
|
}
|
|
617
732
|
static GetMysqlNodeList(req: GetMysqlNodeListReq, initReq?: fm.InitReq): Promise<GetMysqlNodeListResp> {
|
|
618
|
-
return fm.fetchReq<GetMysqlNodeListReq, GetMysqlNodeListResp>(`/apis/mcamel.io/mysql/
|
|
733
|
+
return fm.fetchReq<GetMysqlNodeListReq, GetMysqlNodeListResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/nodes?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
619
734
|
}
|
|
620
735
|
static GetMysqlGrafanaAddr(req: GetMysqlGrafanaAddrReq, initReq?: fm.InitReq): Promise<GetMysqlGrafanaAddrResp> {
|
|
621
|
-
return fm.fetchReq<GetMysqlGrafanaAddrReq, GetMysqlGrafanaAddrResp>(`/apis/mcamel.io/mysql/
|
|
736
|
+
return fm.fetchReq<GetMysqlGrafanaAddrReq, GetMysqlGrafanaAddrResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/grafana?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
622
737
|
}
|
|
623
738
|
static CreateMysql(req: CreateMysqlReq, initReq?: fm.InitReq): Promise<CreateMysqlResp> {
|
|
624
|
-
return fm.fetchReq<CreateMysqlReq, CreateMysqlResp>(`/apis/mcamel.io/mysql/
|
|
739
|
+
return fm.fetchReq<CreateMysqlReq, CreateMysqlResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
625
740
|
}
|
|
626
741
|
static GetMysqlConfs(req: GetMysqlConfReq, initReq?: fm.InitReq): Promise<GetMysqlConfResp> {
|
|
627
|
-
return fm.fetchReq<GetMysqlConfReq, GetMysqlConfResp>(`/apis/mcamel.io/mysql/
|
|
742
|
+
return fm.fetchReq<GetMysqlConfReq, GetMysqlConfResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/confs?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
628
743
|
}
|
|
629
744
|
static UpdateMysqlConf(req: UpdateMysqlConfReq, initReq?: fm.InitReq): Promise<UpdateMysqlConfResp> {
|
|
630
|
-
return fm.fetchReq<UpdateMysqlConfReq, UpdateMysqlConfResp>(`/apis/mcamel.io/mysql/
|
|
745
|
+
return fm.fetchReq<UpdateMysqlConfReq, UpdateMysqlConfResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/conf`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
631
746
|
}
|
|
632
747
|
static UpdateMysqlParams(req: CreateMysqlReq, initReq?: fm.InitReq): Promise<UpdateMysqlParamsResp> {
|
|
633
|
-
return fm.fetchReq<CreateMysqlReq, UpdateMysqlParamsResp>(`/apis/mcamel.io/mysql/
|
|
748
|
+
return fm.fetchReq<CreateMysqlReq, UpdateMysqlParamsResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/params`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
634
749
|
}
|
|
635
750
|
static DeleteMysql(req: DeleteMysqlReq, initReq?: fm.InitReq): Promise<DeleteMysqlResp> {
|
|
636
|
-
return fm.fetchReq<DeleteMysqlReq, DeleteMysqlResp>(`/apis/mcamel.io/mysql/
|
|
751
|
+
return fm.fetchReq<DeleteMysqlReq, DeleteMysqlResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["instanceType"]}/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
637
752
|
}
|
|
638
753
|
static DeleteMysqls(req: DeleteMysqlsReq, initReq?: fm.InitReq): Promise<DeleteMysqlsResp> {
|
|
639
|
-
return fm.fetchReq<DeleteMysqlsReq, DeleteMysqlsResp>(`/apis/mcamel.io/mysql/
|
|
754
|
+
return fm.fetchReq<DeleteMysqlsReq, DeleteMysqlsResp>(`/apis/mcamel.io/mysql/v1alpha2/mysqls`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
640
755
|
}
|
|
641
756
|
static GetMysqlBackupList(req: GetMysqlBackupListReq, initReq?: fm.InitReq): Promise<GetMysqlBackupListResp> {
|
|
642
|
-
return fm.fetchReq<GetMysqlBackupListReq, GetMysqlBackupListResp>(`/apis/mcamel.io/mysql/
|
|
757
|
+
return fm.fetchReq<GetMysqlBackupListReq, GetMysqlBackupListResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backups?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
643
758
|
}
|
|
644
759
|
static GetMysqlBackupJobList(req: GetMysqlBackupJobListReq, initReq?: fm.InitReq): Promise<GetMysqlBackupJobListResp> {
|
|
645
|
-
return fm.fetchReq<GetMysqlBackupJobListReq, GetMysqlBackupJobListResp>(`/apis/mcamel.io/mysql/
|
|
760
|
+
return fm.fetchReq<GetMysqlBackupJobListReq, GetMysqlBackupJobListResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/jobs?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
646
761
|
}
|
|
647
762
|
static CreateMysqlBackup(req: CreateMysqlBackupReq, initReq?: fm.InitReq): Promise<CreateMysqlBackupResp> {
|
|
648
|
-
return fm.fetchReq<CreateMysqlBackupReq, CreateMysqlBackupResp>(`/apis/mcamel.io/mysql/
|
|
763
|
+
return fm.fetchReq<CreateMysqlBackupReq, CreateMysqlBackupResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
649
764
|
}
|
|
650
765
|
static DeleteMysqlBackup(req: DeleteMysqlBackupReq, initReq?: fm.InitReq): Promise<DeleteMysqlBackupResp> {
|
|
651
|
-
return fm.fetchReq<DeleteMysqlBackupReq, DeleteMysqlBackupResp>(`/apis/mcamel.io/mysql/
|
|
766
|
+
return fm.fetchReq<DeleteMysqlBackupReq, DeleteMysqlBackupResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["instanceType"]}/${req["name"]}/backup`, {...initReq, method: "DELETE"})
|
|
652
767
|
}
|
|
653
768
|
static GetMysqlBackupSecret(req: GetMysqlBackupSecretReq, initReq?: fm.InitReq): Promise<GetMysqlBackupSecretResp> {
|
|
654
|
-
return fm.fetchReq<GetMysqlBackupSecretReq, GetMysqlBackupSecretResp>(`/apis/mcamel.io/mysql/
|
|
769
|
+
return fm.fetchReq<GetMysqlBackupSecretReq, GetMysqlBackupSecretResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["workspaceId"]}/secret?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
655
770
|
}
|
|
656
771
|
static GetMysqlBackupProviderList(req: GetMysqlBackupProviderListReq, initReq?: fm.InitReq): Promise<GetMysqlBackupProviderListResp> {
|
|
657
|
-
return fm.fetchReq<GetMysqlBackupProviderListReq, GetMysqlBackupProviderListResp>(`/apis/mcamel.io/mysql/
|
|
772
|
+
return fm.fetchReq<GetMysqlBackupProviderListReq, GetMysqlBackupProviderListResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["workspaceId"]}/providers?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
658
773
|
}
|
|
659
774
|
static SetMysqlBackupSecret(req: SetMysqlBackupSecretReq, initReq?: fm.InitReq): Promise<SetMysqlBackupSecretResp> {
|
|
660
|
-
return fm.fetchReq<SetMysqlBackupSecretReq, SetMysqlBackupSecretResp>(`/apis/mcamel.io/mysql/
|
|
775
|
+
return fm.fetchReq<SetMysqlBackupSecretReq, SetMysqlBackupSecretResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["workspaceId"]}/secret`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
661
776
|
}
|
|
662
777
|
static CreateMysqlRecover(req: CreateMysqlRecoverReq, initReq?: fm.InitReq): Promise<CreateMysqlRecoverResp> {
|
|
663
|
-
return fm.fetchReq<CreateMysqlRecoverReq, CreateMysqlRecoverResp>(`/apis/mcamel.io/mysql/
|
|
778
|
+
return fm.fetchReq<CreateMysqlRecoverReq, CreateMysqlRecoverResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/recover`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
664
779
|
}
|
|
665
780
|
static UpdateMysqlBackupConfig(req: UpdateMysqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdateMysqlBackupConfigResp> {
|
|
666
|
-
return fm.fetchReq<UpdateMysqlBackupConfigReq, UpdateMysqlBackupConfigResp>(`/apis/mcamel.io/mysql/
|
|
781
|
+
return fm.fetchReq<UpdateMysqlBackupConfigReq, UpdateMysqlBackupConfigResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
667
782
|
}
|
|
668
783
|
static GetMysqlUsers(req: GetMysqlUsersReq, initReq?: fm.InitReq): Promise<GetMysqlUsersResp> {
|
|
669
|
-
return fm.fetchReq<GetMysqlUsersReq, GetMysqlUsersResp>(`/apis/mcamel.io/mysql/
|
|
784
|
+
return fm.fetchReq<GetMysqlUsersReq, GetMysqlUsersResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/users?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
670
785
|
}
|
|
671
786
|
static GetMinioList(req: GetMinioListReq, initReq?: fm.InitReq): Promise<GetMinioListResp> {
|
|
672
|
-
return fm.fetchReq<GetMinioListReq, GetMinioListResp>(`/apis/mcamel.io/mysql/
|
|
787
|
+
return fm.fetchReq<GetMinioListReq, GetMinioListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/minios?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
788
|
+
}
|
|
789
|
+
static GetTopology(req: GetTopologyRequest, initReq?: fm.InitReq): Promise<GetTopologyResp> {
|
|
790
|
+
return fm.fetchReq<GetTopologyRequest, GetTopologyResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["instanceType"]}/topology?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name", "instanceType"])}`, {...initReq, method: "GET"})
|
|
673
791
|
}
|
|
674
792
|
}
|
package/package.json
CHANGED
package/storage_config.pb.ts
CHANGED
|
@@ -24,6 +24,7 @@ export enum GetStorageConfigParamRespSelectSelectType {
|
|
|
24
24
|
export enum GetStorageConfigConsumersRespStorageConfigConsumerType {
|
|
25
25
|
STORAGE_CONFIG_CONSUMER_TYPE_UNSPECIFIED = "STORAGE_CONFIG_CONSUMER_TYPE_UNSPECIFIED",
|
|
26
26
|
STORAGE_CONFIG_CONSUMER_TYPE_MYSQL = "STORAGE_CONFIG_CONSUMER_TYPE_MYSQL",
|
|
27
|
+
STORAGE_CONFIG_CONSUMER_TYPE_REDIS = "STORAGE_CONFIG_CONSUMER_TYPE_REDIS",
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export enum GetStorageConfigListReqSortDir {
|
|
@@ -161,27 +162,27 @@ export type GetStorageConfigListResp = {
|
|
|
161
162
|
|
|
162
163
|
export class StorageConfig {
|
|
163
164
|
static GetStorageConfigParam(req: GetStorageConfigParamReq, initReq?: fm.InitReq): Promise<GetStorageConfigParamResp> {
|
|
164
|
-
return fm.fetchReq<GetStorageConfigParamReq, GetStorageConfigParamResp>(`/apis/mcamel.io/mysql/
|
|
165
|
+
return fm.fetchReq<GetStorageConfigParamReq, GetStorageConfigParamResp>(`/apis/mcamel.io/mysql/v1alpha2/storage-config/param?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
165
166
|
}
|
|
166
167
|
static CreateStorageConfigBucketCheckJob(req: CreateStorageConfigBucketCheckJobReq, initReq?: fm.InitReq): Promise<CreateStorageConfigBucketCheckJobResp> {
|
|
167
|
-
return fm.fetchReq<CreateStorageConfigBucketCheckJobReq, CreateStorageConfigBucketCheckJobResp>(`/apis/mcamel.io/mysql/
|
|
168
|
+
return fm.fetchReq<CreateStorageConfigBucketCheckJobReq, CreateStorageConfigBucketCheckJobResp>(`/apis/mcamel.io/mysql/v1alpha2/storage-config/bucket/check-job`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
168
169
|
}
|
|
169
170
|
static CreateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<CreateStorageConfigResp> {
|
|
170
|
-
return fm.fetchReq<CreateStorageConfigReq, CreateStorageConfigResp>(`/apis/mcamel.io/mysql/
|
|
171
|
+
return fm.fetchReq<CreateStorageConfigReq, CreateStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/storage-config`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
171
172
|
}
|
|
172
173
|
static GetStorageConfigConsumers(req: GetStorageConfigConsumersReq, initReq?: fm.InitReq): Promise<GetStorageConfigConsumersResp> {
|
|
173
|
-
return fm.fetchReq<GetStorageConfigConsumersReq, GetStorageConfigConsumersResp>(`/apis/mcamel.io/mysql/
|
|
174
|
+
return fm.fetchReq<GetStorageConfigConsumersReq, GetStorageConfigConsumersResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/storage-config/${req["name"]}/consumers?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
174
175
|
}
|
|
175
176
|
static DeleteStorageConfig(req: DeleteStorageConfigReq, initReq?: fm.InitReq): Promise<DeleteStorageConfigResp> {
|
|
176
|
-
return fm.fetchReq<DeleteStorageConfigReq, DeleteStorageConfigResp>(`/apis/mcamel.io/mysql/
|
|
177
|
+
return fm.fetchReq<DeleteStorageConfigReq, DeleteStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/storage-config/${req["cluster"]}/${req["namespace"]}/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
177
178
|
}
|
|
178
179
|
static UpdateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<UpdateStorageConfigResp> {
|
|
179
|
-
return fm.fetchReq<CreateStorageConfigReq, UpdateStorageConfigResp>(`/apis/mcamel.io/mysql/
|
|
180
|
+
return fm.fetchReq<CreateStorageConfigReq, UpdateStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/storage-config/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
180
181
|
}
|
|
181
182
|
static GetStorageConfig(req: GetStorageConfigReq, initReq?: fm.InitReq): Promise<GetStorageConfigResp> {
|
|
182
|
-
return fm.fetchReq<GetStorageConfigReq, GetStorageConfigResp>(`/apis/mcamel.io/mysql/
|
|
183
|
+
return fm.fetchReq<GetStorageConfigReq, GetStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/storage-config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
183
184
|
}
|
|
184
185
|
static GetStorageConfigList(req: GetStorageConfigListReq, initReq?: fm.InitReq): Promise<GetStorageConfigListResp> {
|
|
185
|
-
return fm.fetchReq<GetStorageConfigListReq, GetStorageConfigListResp>(`/apis/mcamel.io/mysql/
|
|
186
|
+
return fm.fetchReq<GetStorageConfigListReq, GetStorageConfigListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/storage-configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
186
187
|
}
|
|
187
188
|
}
|
package/template.pb.ts
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as CommonCommon from "./common.pb"
|
|
8
|
+
import * as fm from "./fetch.pb"
|
|
9
|
+
|
|
10
|
+
export enum TemplateInstanceType {
|
|
11
|
+
MysqlMasterReplica = "MysqlMasterReplica",
|
|
12
|
+
RedisStandalone = "RedisStandalone",
|
|
13
|
+
RedisFailover = "RedisFailover",
|
|
14
|
+
RedisCluster = "RedisCluster",
|
|
15
|
+
KafkaConfig = "KafkaConfig",
|
|
16
|
+
MysqlMgrConfig = "MysqlMgrConfig",
|
|
17
|
+
MongodbConfig = "MongodbConfig",
|
|
18
|
+
PostgresqlConfig = "PostgresqlConfig",
|
|
19
|
+
RabbitmqConfig = "RabbitmqConfig",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export enum GetTemplateConfigReqSortDir {
|
|
23
|
+
ASC = "ASC",
|
|
24
|
+
DESC = "DESC",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export enum GetTemplateConfigListReqSortDir {
|
|
28
|
+
ASC = "ASC",
|
|
29
|
+
DESC = "DESC",
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export enum TemplateConfigItemValueType {
|
|
33
|
+
String = "String",
|
|
34
|
+
SingleSelection = "SingleSelection",
|
|
35
|
+
MultiString = "MultiString",
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type UpdateTemplateConfigToItemReq = {
|
|
39
|
+
workspaceId?: number
|
|
40
|
+
conf?: string
|
|
41
|
+
version?: string
|
|
42
|
+
templateInstanceType?: TemplateInstanceType
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type UpdateTemplateConfigToItemResp = {
|
|
46
|
+
items?: TemplateConfigItem[]
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type GetTemplateConfigVersionsReq = {
|
|
50
|
+
workspaceId?: number
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type GetTemplateConfigVersionsResp = {
|
|
54
|
+
versions?: string[]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type GetTemplateConfigStringResp = {
|
|
58
|
+
conf?: string
|
|
59
|
+
fileName?: string
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type DeleteTemplateReq = {
|
|
63
|
+
workspaceId?: number
|
|
64
|
+
name?: string
|
|
65
|
+
version?: string
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type DeleteTemplateConfigResp = {
|
|
69
|
+
message?: string
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export type CreateOrUpdateTemplateConfigResp = {
|
|
73
|
+
message?: string
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type GetTemplateConfigReq = {
|
|
77
|
+
page?: number
|
|
78
|
+
pageSize?: number
|
|
79
|
+
sortDir?: GetTemplateConfigReqSortDir
|
|
80
|
+
sortBy?: string
|
|
81
|
+
searchKey?: string
|
|
82
|
+
workspaceId?: number
|
|
83
|
+
name?: string
|
|
84
|
+
version?: string
|
|
85
|
+
templateType?: string
|
|
86
|
+
type?: string
|
|
87
|
+
createTimestamp?: string
|
|
88
|
+
templateInstanceType?: TemplateInstanceType
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type GetTemplateConfigStringReq = {
|
|
92
|
+
workspaceId?: number
|
|
93
|
+
name?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type CreateTemplateConfigResp = {
|
|
97
|
+
message?: string
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export type UpdateTemplateConfigResp = {
|
|
101
|
+
message?: string
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type CreateTemplateConfigReq = {
|
|
105
|
+
workspaceId?: number
|
|
106
|
+
targetName?: string
|
|
107
|
+
targetVersion?: string
|
|
108
|
+
targetType?: string
|
|
109
|
+
targetTemplateType?: string
|
|
110
|
+
targetConf?: string
|
|
111
|
+
fromTemplateName?: string
|
|
112
|
+
targetTemplateInstanceType?: TemplateInstanceType
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export type UpdateTemplateConfigReq = {
|
|
116
|
+
workspaceId?: number
|
|
117
|
+
name?: string
|
|
118
|
+
version?: string
|
|
119
|
+
type?: string
|
|
120
|
+
templateType?: string
|
|
121
|
+
items?: TemplateConfigItem[]
|
|
122
|
+
conf?: string
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export type GetTemplateConfigResp = {
|
|
126
|
+
data?: UpdateTemplateConfigReq
|
|
127
|
+
pagination?: CommonCommon.Pagination
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type GetTemplateConfigListReq = {
|
|
131
|
+
page?: number
|
|
132
|
+
pageSize?: number
|
|
133
|
+
sortDir?: GetTemplateConfigListReqSortDir
|
|
134
|
+
sortBy?: string
|
|
135
|
+
searchKey?: string
|
|
136
|
+
workspaceId?: number
|
|
137
|
+
version?: string
|
|
138
|
+
templateInstanceType?: TemplateInstanceType
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type TemplateConfigItem = {
|
|
142
|
+
name?: string
|
|
143
|
+
default?: string
|
|
144
|
+
current?: string
|
|
145
|
+
value?: string
|
|
146
|
+
isNeedRestart?: boolean
|
|
147
|
+
valueType?: TemplateConfigItemValueType
|
|
148
|
+
valueRemarksZh?: string
|
|
149
|
+
valueRemarksEn?: string
|
|
150
|
+
updateTimestamp?: string
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export type GetTemplateConfigListResp = {
|
|
154
|
+
items?: GetTemplateConfigReq[]
|
|
155
|
+
pagination?: CommonCommon.Pagination
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export type GetTemplateInstanceTypeListReq = {
|
|
159
|
+
workspaceId?: number
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export type GetTemplateInstanceTypeListResp = {
|
|
163
|
+
type?: TemplateInstanceType[]
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export class Template {
|
|
167
|
+
static GetTemplateConfigList(req: GetTemplateConfigListReq, initReq?: fm.InitReq): Promise<GetTemplateConfigListResp> {
|
|
168
|
+
return fm.fetchReq<GetTemplateConfigListReq, GetTemplateConfigListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/template_config?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
169
|
+
}
|
|
170
|
+
static GetTemplateInstanceTypeList(req: GetTemplateInstanceTypeListReq, initReq?: fm.InitReq): Promise<GetTemplateInstanceTypeListResp> {
|
|
171
|
+
return fm.fetchReq<GetTemplateInstanceTypeListReq, GetTemplateInstanceTypeListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/template_instance_type?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
172
|
+
}
|
|
173
|
+
static GetTemplateConfig(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigResp> {
|
|
174
|
+
return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/template_config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
175
|
+
}
|
|
176
|
+
static DeleteTemplateConfig(req: DeleteTemplateReq, initReq?: fm.InitReq): Promise<DeleteTemplateConfigResp> {
|
|
177
|
+
return fm.fetchReq<DeleteTemplateReq, DeleteTemplateConfigResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/template_config/${req["name"]}/${req["version"]}`, {...initReq, method: "DELETE"})
|
|
178
|
+
}
|
|
179
|
+
static CreateTemplateConfig(req: CreateTemplateConfigReq, initReq?: fm.InitReq): Promise<CreateTemplateConfigResp> {
|
|
180
|
+
return fm.fetchReq<CreateTemplateConfigReq, CreateTemplateConfigResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/template_config`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
181
|
+
}
|
|
182
|
+
static UpdateTemplateConfig(req: UpdateTemplateConfigReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigResp> {
|
|
183
|
+
return fm.fetchReq<UpdateTemplateConfigReq, UpdateTemplateConfigResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/template_config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
184
|
+
}
|
|
185
|
+
static GetTemplateConfigString(req: GetTemplateConfigStringReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
|
|
186
|
+
return fm.fetchReq<GetTemplateConfigStringReq, GetTemplateConfigStringResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/template_config/${req["name"]}/to_string?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
187
|
+
}
|
|
188
|
+
static UpdateTemplateConfigToItem(req: UpdateTemplateConfigToItemReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigToItemResp> {
|
|
189
|
+
return fm.fetchReq<UpdateTemplateConfigToItemReq, UpdateTemplateConfigToItemResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/template_config/to_template`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
190
|
+
}
|
|
191
|
+
static GetTemplateConfigVersions(req: GetTemplateConfigVersionsReq, initReq?: fm.InitReq): Promise<GetTemplateConfigVersionsResp> {
|
|
192
|
+
return fm.fetchReq<GetTemplateConfigVersionsReq, GetTemplateConfigVersionsResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/template_config/versions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
193
|
+
}
|
|
194
|
+
}
|
package/version.pb.ts
CHANGED
|
@@ -17,11 +17,18 @@ 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
|
|
|
23
27
|
export class Version {
|
|
24
28
|
static Get(req: Empty, initReq?: fm.InitReq): Promise<GetVersionReply> {
|
|
25
|
-
return fm.fetchReq<Empty, GetVersionReply>(`/apis/mcamel.io/mysql/
|
|
29
|
+
return fm.fetchReq<Empty, GetVersionReply>(`/apis/mcamel.io/mysql/v1alpha2/mysql/version?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
30
|
+
}
|
|
31
|
+
static Healthz(req: Empty, initReq?: fm.InitReq): Promise<HealthzReply> {
|
|
32
|
+
return fm.fetchReq<Empty, HealthzReply>(`/healthz?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
26
33
|
}
|
|
27
34
|
}
|