@daocloud-proto/mcamel-mysql 0.5.0-49 → 0.5.0-490
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 +78 -0
- package/cluster.pb.ts +213 -0
- package/common.pb.ts +79 -0
- package/insight.pb.ts +8 -12
- package/mysql.pb.ts +30 -9
- package/package.json +1 -1
- package/storage_config.pb.ts +1 -0
- package/template.pb.ts +168 -0
package/cloudshell.pb.ts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
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 GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
|
|
8
|
+
import * as CommonCommon from "./common.pb"
|
|
9
|
+
import * as fm from "./fetch.pb"
|
|
10
|
+
|
|
11
|
+
export enum CreateCloudShellRequestType {
|
|
12
|
+
TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
|
|
13
|
+
bash = "bash",
|
|
14
|
+
exec = "exec",
|
|
15
|
+
logs = "logs",
|
|
16
|
+
upload = "upload",
|
|
17
|
+
download = "download",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type ObjectMeta = {
|
|
21
|
+
name?: string
|
|
22
|
+
namespace?: string
|
|
23
|
+
uid?: string
|
|
24
|
+
resourceVersion?: string
|
|
25
|
+
creationTimestamp?: string
|
|
26
|
+
deletionTimestamp?: string
|
|
27
|
+
labels?: {[key: string]: string}
|
|
28
|
+
annotations?: {[key: string]: string}
|
|
29
|
+
ownerReferences?: CommonCommon.OwnerReference[]
|
|
30
|
+
cluster?: string
|
|
31
|
+
workspaceAlias?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type CloudShell = {
|
|
35
|
+
metadata?: ObjectMeta
|
|
36
|
+
spec?: CloudShellSpec
|
|
37
|
+
status?: CloudShellStatus
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type CloudShellSpec = {
|
|
41
|
+
configMapName?: string
|
|
42
|
+
once?: boolean
|
|
43
|
+
commandAction?: string
|
|
44
|
+
ttl?: number
|
|
45
|
+
cleanup?: boolean
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type CloudShellStatus = {
|
|
49
|
+
phase?: string
|
|
50
|
+
accessUrl?: string
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type CreateCloudShellRequest = {
|
|
54
|
+
type?: CreateCloudShellRequestType
|
|
55
|
+
cluster?: string
|
|
56
|
+
namespace?: string
|
|
57
|
+
podName?: string
|
|
58
|
+
filePath?: string
|
|
59
|
+
container?: string
|
|
60
|
+
logCount?: number
|
|
61
|
+
data?: CloudShell
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type GetorDeleteCloudShellRequest = {
|
|
65
|
+
name?: string
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export class CloudShellService {
|
|
69
|
+
static CreateCloudShell(req: CreateCloudShellRequest, initReq?: fm.InitReq): Promise<CloudShell> {
|
|
70
|
+
return fm.fetchReq<CreateCloudShellRequest, CloudShell>(`/apis/mcamel.io/mysql/v1alpha1/cloudshells`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
71
|
+
}
|
|
72
|
+
static GetCloudShell(req: GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<CloudShell> {
|
|
73
|
+
return fm.fetchReq<GetorDeleteCloudShellRequest, CloudShell>(`/apis/mcamel.io/mysql/v1alpha1/cloudshells/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
|
|
74
|
+
}
|
|
75
|
+
static DeleteCloudShell(req: GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
76
|
+
return fm.fetchReq<GetorDeleteCloudShellRequest, GoogleProtobufEmpty.Empty>(`/apis/mcamel.io/mysql/v1alpha1/cloudshells/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
77
|
+
}
|
|
78
|
+
}
|
package/cluster.pb.ts
CHANGED
|
@@ -7,12 +7,41 @@
|
|
|
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",
|
|
13
37
|
Warning = "Warning",
|
|
14
38
|
}
|
|
15
39
|
|
|
40
|
+
export enum GetAllEventListReqSortDir {
|
|
41
|
+
ASC = "ASC",
|
|
42
|
+
DESC = "DESC",
|
|
43
|
+
}
|
|
44
|
+
|
|
16
45
|
export enum GetEventListReqKind {
|
|
17
46
|
KIND_UNSPECIFIED = "KIND_UNSPECIFIED",
|
|
18
47
|
Pod = "Pod",
|
|
@@ -23,11 +52,125 @@ export enum GetWorkspaceListReqSortDir {
|
|
|
23
52
|
DESC = "DESC",
|
|
24
53
|
}
|
|
25
54
|
|
|
55
|
+
export enum ClusterItemNetworkMode {
|
|
56
|
+
Unknown = "Unknown",
|
|
57
|
+
Flannel = "Flannel",
|
|
58
|
+
Calico = "Calico",
|
|
59
|
+
}
|
|
60
|
+
|
|
26
61
|
export enum GetInsightAgentStatusRespInsightAgentStatus {
|
|
27
62
|
NotInstall = "NotInstall",
|
|
28
63
|
Install = "Install",
|
|
29
64
|
}
|
|
30
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
|
+
|
|
118
|
+
export type GetAllEventListReq = {
|
|
119
|
+
page?: number
|
|
120
|
+
pageSize?: number
|
|
121
|
+
sortDir?: GetAllEventListReqSortDir
|
|
122
|
+
sortBy?: string
|
|
123
|
+
searchKey?: string
|
|
124
|
+
cluster?: string
|
|
125
|
+
namespace?: string
|
|
126
|
+
name?: string
|
|
127
|
+
eventType?: EventType
|
|
128
|
+
kindName?: string
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export type GetAllEventListRespItemsSource = {
|
|
132
|
+
component?: string
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export type GetAllEventListRespItemsMetadata = {
|
|
136
|
+
uid?: string
|
|
137
|
+
name?: string
|
|
138
|
+
namespace?: string
|
|
139
|
+
annotations?: {[key: string]: string}
|
|
140
|
+
resourceVersion?: string
|
|
141
|
+
creationTimestamp?: string
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export type GetAllEventListRespItemsInvolvedObject = {
|
|
145
|
+
uid?: string
|
|
146
|
+
kind?: string
|
|
147
|
+
name?: string
|
|
148
|
+
namespace?: string
|
|
149
|
+
apiVersion?: string
|
|
150
|
+
resourceVersion?: string
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export type GetAllEventListRespItems = {
|
|
154
|
+
kind?: string
|
|
155
|
+
type?: string
|
|
156
|
+
count?: number
|
|
157
|
+
reason?: string
|
|
158
|
+
source?: GetAllEventListRespItemsSource
|
|
159
|
+
message?: string
|
|
160
|
+
metadata?: GetAllEventListRespItemsMetadata
|
|
161
|
+
apiVersion?: string
|
|
162
|
+
lastTimestamp?: string
|
|
163
|
+
firstTimestamp?: string
|
|
164
|
+
involvedObject?: GetAllEventListRespItemsInvolvedObject
|
|
165
|
+
reportingInstance?: string
|
|
166
|
+
reportingComponent?: string
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type GetAllEventListResp = {
|
|
170
|
+
items?: GetAllEventListRespItems[]
|
|
171
|
+
pagination?: CommonCommon.Pagination
|
|
172
|
+
}
|
|
173
|
+
|
|
31
174
|
export type GetClusterNodeLabelListReq = {
|
|
32
175
|
cluster?: string
|
|
33
176
|
}
|
|
@@ -42,6 +185,24 @@ export type GetClusterNodeLabelListResp = {
|
|
|
42
185
|
pagination?: CommonCommon.Pagination
|
|
43
186
|
}
|
|
44
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
|
+
|
|
45
206
|
export type GetClusterNodePortListReq = {
|
|
46
207
|
cluster?: string
|
|
47
208
|
}
|
|
@@ -56,6 +217,24 @@ export type EventSource = {
|
|
|
56
217
|
host?: string
|
|
57
218
|
}
|
|
58
219
|
|
|
220
|
+
export type GetMetallbIPAddressPoolsListReq = {
|
|
221
|
+
cluster?: string
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export type GetMetallbIPAddressPoolsListRespItem = {
|
|
225
|
+
name?: string
|
|
226
|
+
addresses?: string[]
|
|
227
|
+
autoAssign?: boolean
|
|
228
|
+
avoidBuggyIPs?: boolean
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export type GetMetallbIPAddressPoolsListResp = {
|
|
232
|
+
items?: GetMetallbIPAddressPoolsListRespItem[]
|
|
233
|
+
isSupportLb?: boolean
|
|
234
|
+
externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy[]
|
|
235
|
+
lbTyp?: CommonCommon.LBTyp[]
|
|
236
|
+
}
|
|
237
|
+
|
|
59
238
|
export type GetEventListReq = {
|
|
60
239
|
cluster?: string
|
|
61
240
|
namespace?: string
|
|
@@ -96,6 +275,7 @@ export type GetWorkspaceListReq = {
|
|
|
96
275
|
export type GetWorkspaceListRespItem = {
|
|
97
276
|
workspaceId?: number
|
|
98
277
|
alias?: string
|
|
278
|
+
visible?: boolean
|
|
99
279
|
}
|
|
100
280
|
|
|
101
281
|
export type GetWorkspaceListResp = {
|
|
@@ -105,13 +285,28 @@ export type GetWorkspaceListResp = {
|
|
|
105
285
|
|
|
106
286
|
export type GetClusterListReq = {
|
|
107
287
|
workspaceId?: number
|
|
288
|
+
searchKey?: string
|
|
108
289
|
}
|
|
109
290
|
|
|
110
291
|
export type GetClusterListResp = {
|
|
111
292
|
items?: string[]
|
|
293
|
+
clusters?: ClusterItem[]
|
|
112
294
|
pagination?: CommonCommon.Pagination
|
|
113
295
|
}
|
|
114
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
|
+
|
|
115
310
|
export type GetClusterNamespaceListReq = {
|
|
116
311
|
workspaceId?: number
|
|
117
312
|
cluster?: string
|
|
@@ -143,6 +338,9 @@ export class Cluster {
|
|
|
143
338
|
static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
|
|
144
339
|
return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
145
340
|
}
|
|
341
|
+
static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
|
|
342
|
+
return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
343
|
+
}
|
|
146
344
|
static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
|
|
147
345
|
return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/mysql/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
148
346
|
}
|
|
@@ -152,4 +350,19 @@ export class Cluster {
|
|
|
152
350
|
static GetEventList(req: GetEventListReq, initReq?: fm.InitReq): Promise<GetEventListResp> {
|
|
153
351
|
return fm.fetchReq<GetEventListReq, GetEventListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/${req["namespace"]}/events?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
154
352
|
}
|
|
353
|
+
static GetAllEventList(req: GetAllEventListReq, initReq?: fm.InitReq): Promise<GetAllEventListResp> {
|
|
354
|
+
return fm.fetchReq<GetAllEventListReq, GetAllEventListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/${req["namespace"]}/${req["name"]}/all-events?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
355
|
+
}
|
|
356
|
+
static GetAllEventKindsList(req: GetAllEventKindsListReq, initReq?: fm.InitReq): Promise<GetAllEventKindsListResp> {
|
|
357
|
+
return fm.fetchReq<GetAllEventKindsListReq, GetAllEventKindsListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/all-events-kinds?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
358
|
+
}
|
|
359
|
+
static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
|
|
360
|
+
return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
361
|
+
}
|
|
362
|
+
static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
|
|
363
|
+
return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/mysql/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/mysql/v1alpha1/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
367
|
+
}
|
|
155
368
|
}
|
package/common.pb.ts
CHANGED
|
@@ -4,6 +4,22 @@
|
|
|
4
4
|
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
export enum ExternalTrafficPolicy {
|
|
8
|
+
Cluster = "Cluster",
|
|
9
|
+
Local = "Local",
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum LBTyp {
|
|
13
|
+
MetalLB = "MetalLB",
|
|
14
|
+
Others = "Others",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export enum ServiceType {
|
|
18
|
+
ClusterIP = "ClusterIP",
|
|
19
|
+
NodePort = "NodePort",
|
|
20
|
+
LoadBalancer = "LoadBalancer",
|
|
21
|
+
}
|
|
22
|
+
|
|
7
23
|
export enum PageInfoReqSortDir {
|
|
8
24
|
ASC = "ASC",
|
|
9
25
|
DESC = "DESC",
|
|
@@ -129,10 +145,73 @@ export type PodCommon = {
|
|
|
129
145
|
cpuLimit?: number
|
|
130
146
|
memoryUsage?: number
|
|
131
147
|
memoryLimit?: number
|
|
148
|
+
pvUsedInGb?: number
|
|
149
|
+
pvAllocatedInGb?: number
|
|
132
150
|
conditions?: PodCommonCondition[]
|
|
151
|
+
containersName?: string[]
|
|
152
|
+
ownerReference?: OwnerReference[]
|
|
153
|
+
initContainersName?: string[]
|
|
154
|
+
initContainersStatuses?: ContainerStatus[]
|
|
155
|
+
containersStatuses?: ContainerStatus[]
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export type OwnerReference = {
|
|
159
|
+
uid?: string
|
|
160
|
+
controller?: boolean
|
|
161
|
+
name?: string
|
|
162
|
+
kind?: string
|
|
133
163
|
}
|
|
134
164
|
|
|
135
165
|
export type CommonItemStatus = {
|
|
136
166
|
serviceAddresses?: string[]
|
|
137
167
|
webManagerAddress?: string
|
|
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
|
|
138
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/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> =
|
|
@@ -78,12 +79,6 @@ export enum GetMysqlConfReqSortDir {
|
|
|
78
79
|
DESC = "DESC",
|
|
79
80
|
}
|
|
80
81
|
|
|
81
|
-
export enum CreateMysqlReqServiceType {
|
|
82
|
-
ClusterIP = "ClusterIP",
|
|
83
|
-
NodePort = "NodePort",
|
|
84
|
-
LoadBalancer = "LoadBalancer",
|
|
85
|
-
}
|
|
86
|
-
|
|
87
82
|
export enum GetMysqlParamRespSelectSelectType {
|
|
88
83
|
Single = "Single",
|
|
89
84
|
Multiple = "Multiple",
|
|
@@ -119,6 +114,13 @@ export enum GetMysqlConfRespItemsParamType {
|
|
|
119
114
|
conf = "conf",
|
|
120
115
|
}
|
|
121
116
|
|
|
117
|
+
export enum MysqlClusterItemStatusRestoreInitialStatus {
|
|
118
|
+
Unknown = "Unknown",
|
|
119
|
+
Running = "Running",
|
|
120
|
+
Failed = "Failed",
|
|
121
|
+
Succeeded = "Succeeded",
|
|
122
|
+
}
|
|
123
|
+
|
|
122
124
|
export type GetMinioListReq = {
|
|
123
125
|
page?: number
|
|
124
126
|
pageSize?: number
|
|
@@ -191,6 +193,8 @@ export type CreateMysqlRecoverReq = {
|
|
|
191
193
|
name?: string
|
|
192
194
|
backupName?: string
|
|
193
195
|
targetMysqlClusterName?: string
|
|
196
|
+
targetMysqlClusterNamespace?: string
|
|
197
|
+
targetMysqlClusterCluster?: string
|
|
194
198
|
}
|
|
195
199
|
|
|
196
200
|
export type CreateMysqlRecoverResp = {
|
|
@@ -343,6 +347,8 @@ export type GetMysqlListReq = {
|
|
|
343
347
|
sortBy?: string
|
|
344
348
|
searchKey?: string
|
|
345
349
|
workspaceId?: number
|
|
350
|
+
filterCluster?: string
|
|
351
|
+
filterNamespace?: string
|
|
346
352
|
}
|
|
347
353
|
|
|
348
354
|
export type GetMysqlConfReq = {
|
|
@@ -379,7 +385,7 @@ export type CreateMysqlReq = {
|
|
|
379
385
|
storageClassName?: string
|
|
380
386
|
storageCapacity?: string
|
|
381
387
|
rootPassword?: string
|
|
382
|
-
serviceType?:
|
|
388
|
+
serviceType?: CommonCommon.ServiceType
|
|
383
389
|
serviceAnnotations?: {[key: string]: string}
|
|
384
390
|
ports?: CreateMysqlReqPorts[]
|
|
385
391
|
cpuRequest?: string
|
|
@@ -387,11 +393,12 @@ export type CreateMysqlReq = {
|
|
|
387
393
|
memoryRequest?: string
|
|
388
394
|
memoryLimit?: string
|
|
389
395
|
conf?: string
|
|
396
|
+
confTemplateName?: string
|
|
390
397
|
backupSchedule?: string
|
|
391
398
|
backupSecretName?: string
|
|
392
399
|
backupBucket?: string
|
|
393
400
|
isOpenPhpAdmin?: boolean
|
|
394
|
-
phpAdminServiceType?:
|
|
401
|
+
phpAdminServiceType?: CommonCommon.ServiceType
|
|
395
402
|
phpAdminNodePort?: number
|
|
396
403
|
phpAdminCpuRequest?: string
|
|
397
404
|
phpAdminCpuLimit?: string
|
|
@@ -408,13 +415,24 @@ export type CreateMysqlReq = {
|
|
|
408
415
|
storageConfigNamespace?: string
|
|
409
416
|
storageConfigCluster?: string
|
|
410
417
|
affinity?: CommonCommon.Affinity
|
|
418
|
+
serviceMonitorInterval?: string
|
|
419
|
+
accessWhitelist?: CommonCommon.AccessWhitelist
|
|
420
|
+
externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
|
|
421
|
+
lbTyp?: CommonCommon.LBTyp
|
|
422
|
+
lbPoolName?: string
|
|
423
|
+
lbAddress?: string
|
|
424
|
+
phpAdminExternalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
|
|
425
|
+
phpAdminLbTyp?: CommonCommon.LBTyp
|
|
426
|
+
phpAdminLbPoolName?: string
|
|
427
|
+
phpAdminLbAddress?: string
|
|
411
428
|
}
|
|
412
429
|
|
|
413
430
|
export type UpdateMysqlConfReq = {
|
|
414
431
|
cluster?: string
|
|
415
432
|
namespace?: string
|
|
416
433
|
name?: string
|
|
417
|
-
|
|
434
|
+
confItems?: TemplateTemplate.TemplateConfigItem[]
|
|
435
|
+
reloadFromConfTemplateName?: string
|
|
418
436
|
}
|
|
419
437
|
|
|
420
438
|
export type UpdateMysqlParamsResp = {
|
|
@@ -541,6 +559,8 @@ export type GetMysqlGrafanaAddrReq = {
|
|
|
541
559
|
cluster?: string
|
|
542
560
|
namespace?: string
|
|
543
561
|
name?: string
|
|
562
|
+
from?: string
|
|
563
|
+
to?: string
|
|
544
564
|
}
|
|
545
565
|
|
|
546
566
|
export type GetMysqlGrafanaAddrResp = {
|
|
@@ -586,6 +606,7 @@ export type MysqlClusterItemStatus = {
|
|
|
586
606
|
secondsBehindMaster?: number
|
|
587
607
|
cpuUtilization?: number
|
|
588
608
|
memoryUtilization?: number
|
|
609
|
+
restoreInitialStatus?: MysqlClusterItemStatusRestoreInitialStatus
|
|
589
610
|
}
|
|
590
611
|
|
|
591
612
|
export type MysqlClusterItemMetadata = {
|
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 {
|
package/template.pb.ts
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
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
|
+
}
|
|
16
|
+
|
|
17
|
+
export enum GetTemplateConfigReqSortDir {
|
|
18
|
+
ASC = "ASC",
|
|
19
|
+
DESC = "DESC",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export enum GetTemplateConfigListReqSortDir {
|
|
23
|
+
ASC = "ASC",
|
|
24
|
+
DESC = "DESC",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export enum TemplateConfigItemValueType {
|
|
28
|
+
String = "String",
|
|
29
|
+
SingleSelection = "SingleSelection",
|
|
30
|
+
MultiString = "MultiString",
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type GetTemplateConfigVersionsReq = {
|
|
34
|
+
workspaceId?: number
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type GetTemplateConfigVersionsResp = {
|
|
38
|
+
versions?: string[]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type GetTemplateConfigStringResp = {
|
|
42
|
+
conf?: string
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type DeleteTemplateReq = {
|
|
46
|
+
workspaceId?: number
|
|
47
|
+
name?: string
|
|
48
|
+
version?: string
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type DeleteTemplateConfigResp = {
|
|
52
|
+
message?: string
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type CreateOrUpdateTemplateConfigResp = {
|
|
56
|
+
message?: string
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type GetTemplateConfigReq = {
|
|
60
|
+
page?: number
|
|
61
|
+
pageSize?: number
|
|
62
|
+
sortDir?: GetTemplateConfigReqSortDir
|
|
63
|
+
sortBy?: string
|
|
64
|
+
searchKey?: string
|
|
65
|
+
workspaceId?: number
|
|
66
|
+
name?: string
|
|
67
|
+
version?: string
|
|
68
|
+
templateType?: string
|
|
69
|
+
type?: string
|
|
70
|
+
createTimestamp?: string
|
|
71
|
+
templateInstanceType?: TemplateInstanceType
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type CreateTemplateConfigResp = {
|
|
75
|
+
message?: string
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type UpdateTemplateConfigResp = {
|
|
79
|
+
message?: string
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type CreateTemplateConfigReq = {
|
|
83
|
+
workspaceId?: number
|
|
84
|
+
targetName?: string
|
|
85
|
+
targetVersion?: string
|
|
86
|
+
targetType?: string
|
|
87
|
+
targetTemplateType?: string
|
|
88
|
+
targetConf?: string
|
|
89
|
+
fromTemplateName?: string
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export type UpdateTemplateConfigReq = {
|
|
93
|
+
workspaceId?: number
|
|
94
|
+
name?: string
|
|
95
|
+
version?: string
|
|
96
|
+
type?: string
|
|
97
|
+
templateType?: string
|
|
98
|
+
items?: TemplateConfigItem[]
|
|
99
|
+
conf?: string
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export type GetTemplateConfigResp = {
|
|
103
|
+
data?: UpdateTemplateConfigReq
|
|
104
|
+
pagination?: CommonCommon.Pagination
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type GetTemplateConfigListReq = {
|
|
108
|
+
page?: number
|
|
109
|
+
pageSize?: number
|
|
110
|
+
sortDir?: GetTemplateConfigListReqSortDir
|
|
111
|
+
sortBy?: string
|
|
112
|
+
searchKey?: string
|
|
113
|
+
workspaceId?: number
|
|
114
|
+
version?: string
|
|
115
|
+
templateInstanceType?: TemplateInstanceType
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export type TemplateConfigItem = {
|
|
119
|
+
name?: string
|
|
120
|
+
default?: string
|
|
121
|
+
current?: string
|
|
122
|
+
value?: string
|
|
123
|
+
isNeedRestart?: boolean
|
|
124
|
+
valueType?: TemplateConfigItemValueType
|
|
125
|
+
valueRemarksZh?: string
|
|
126
|
+
valueRemarksEn?: string
|
|
127
|
+
updateTimestamp?: string
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type GetTemplateConfigListResp = {
|
|
131
|
+
items?: GetTemplateConfigReq[]
|
|
132
|
+
pagination?: CommonCommon.Pagination
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export type GetTemplateInstanceTypeListReq = {
|
|
136
|
+
workspaceId?: number
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export type GetTemplateInstanceTypeListResp = {
|
|
140
|
+
type?: TemplateInstanceType[]
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export class Template {
|
|
144
|
+
static GetTemplateConfigList(req: GetTemplateConfigListReq, initReq?: fm.InitReq): Promise<GetTemplateConfigListResp> {
|
|
145
|
+
return fm.fetchReq<GetTemplateConfigListReq, GetTemplateConfigListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
146
|
+
}
|
|
147
|
+
static GetTemplateInstanceTypeList(req: GetTemplateInstanceTypeListReq, initReq?: fm.InitReq): Promise<GetTemplateInstanceTypeListResp> {
|
|
148
|
+
return fm.fetchReq<GetTemplateInstanceTypeListReq, GetTemplateInstanceTypeListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_instance_type?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
149
|
+
}
|
|
150
|
+
static GetTemplateConfig(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigResp> {
|
|
151
|
+
return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
152
|
+
}
|
|
153
|
+
static DeleteTemplateConfig(req: DeleteTemplateReq, initReq?: fm.InitReq): Promise<DeleteTemplateConfigResp> {
|
|
154
|
+
return fm.fetchReq<DeleteTemplateReq, DeleteTemplateConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/${req["version"]}`, {...initReq, method: "DELETE"})
|
|
155
|
+
}
|
|
156
|
+
static CreateTemplateConfig(req: CreateTemplateConfigReq, initReq?: fm.InitReq): Promise<CreateTemplateConfigResp> {
|
|
157
|
+
return fm.fetchReq<CreateTemplateConfigReq, CreateTemplateConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
158
|
+
}
|
|
159
|
+
static UpdateTemplateConfig(req: UpdateTemplateConfigReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigResp> {
|
|
160
|
+
return fm.fetchReq<UpdateTemplateConfigReq, UpdateTemplateConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
161
|
+
}
|
|
162
|
+
static GetTemplateConfigString(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
|
|
163
|
+
return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigStringResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/to_string?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
164
|
+
}
|
|
165
|
+
static GetTemplateConfigVersions(req: GetTemplateConfigVersionsReq, initReq?: fm.InitReq): Promise<GetTemplateConfigVersionsResp> {
|
|
166
|
+
return fm.fetchReq<GetTemplateConfigVersionsReq, GetTemplateConfigVersionsResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config/versions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
167
|
+
}
|
|
168
|
+
}
|