@daocloud-proto/baize 0.116.1 → 0.117.0
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/common/common.pb.ts
CHANGED
|
@@ -3,6 +3,27 @@
|
|
|
3
3
|
/*
|
|
4
4
|
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
5
|
*/
|
|
6
|
+
|
|
7
|
+
export enum NodePhase {
|
|
8
|
+
NODE_PHASE_UNSPECIFIED = "NODE_PHASE_UNSPECIFIED",
|
|
9
|
+
Ready = "Ready",
|
|
10
|
+
Not_Ready = "Not_Ready",
|
|
11
|
+
Unknown = "Unknown",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export enum TaintEffect {
|
|
15
|
+
TAINT_EFFECT_UNSPECIFIED = "TAINT_EFFECT_UNSPECIFIED",
|
|
16
|
+
NoSchedule = "NoSchedule",
|
|
17
|
+
NoExecute = "NoExecute",
|
|
18
|
+
PreferNoSchedule = "PreferNoSchedule",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export enum TolerationOperator {
|
|
22
|
+
TOLERATION_OPERATOR_UNSPECIFIED = "TOLERATION_OPERATOR_UNSPECIFIED",
|
|
23
|
+
Exists = "Exists",
|
|
24
|
+
Equal = "Equal",
|
|
25
|
+
}
|
|
26
|
+
|
|
6
27
|
export type NoParamsQuery = {
|
|
7
28
|
}
|
|
8
29
|
|
|
@@ -58,4 +79,64 @@ export type AuditObject = {
|
|
|
58
79
|
kind?: string
|
|
59
80
|
group?: string
|
|
60
81
|
version?: string
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type NodeAddress = {
|
|
85
|
+
type?: string
|
|
86
|
+
address?: string
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export type NodeSystemInfo = {
|
|
90
|
+
kernelVersion?: string
|
|
91
|
+
osImage?: string
|
|
92
|
+
containerRuntimeVersion?: string
|
|
93
|
+
kubeletVersion?: string
|
|
94
|
+
kubeProxyVersion?: string
|
|
95
|
+
operatingSystem?: string
|
|
96
|
+
architecture?: string
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export type NodeStatus = {
|
|
100
|
+
phase?: NodePhase
|
|
101
|
+
addresses?: NodeAddress[]
|
|
102
|
+
cpuCapacity?: string
|
|
103
|
+
cpuAllocated?: number
|
|
104
|
+
cpuUsage?: number
|
|
105
|
+
memoryCapacity?: string
|
|
106
|
+
memoryAllocated?: number
|
|
107
|
+
memoryUsage?: number
|
|
108
|
+
systemInfo?: NodeSystemInfo
|
|
109
|
+
allowedPodNumber?: number
|
|
110
|
+
podAllocated?: number
|
|
111
|
+
readyPodNumber?: number
|
|
112
|
+
storageCapacity?: string
|
|
113
|
+
storageAllocated?: string
|
|
114
|
+
storageUsage?: number
|
|
115
|
+
storageDriver?: string
|
|
116
|
+
gpuTotal?: string
|
|
117
|
+
gpuAllocated?: string
|
|
118
|
+
gpuMemoryTotal?: string
|
|
119
|
+
gpuMemoryAllocated?: string
|
|
120
|
+
gpuCoreUsage?: number
|
|
121
|
+
gpuMemoryUsage?: number
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export type Taint = {
|
|
125
|
+
key?: string
|
|
126
|
+
value?: string
|
|
127
|
+
effect?: TaintEffect
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type Toleration = {
|
|
131
|
+
key?: string
|
|
132
|
+
operator?: TolerationOperator
|
|
133
|
+
value?: string
|
|
134
|
+
effect?: TaintEffect
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export type Node = {
|
|
138
|
+
name?: string
|
|
139
|
+
arch?: string
|
|
140
|
+
labels?: {[key: string]: string}
|
|
141
|
+
status?: NodeStatus
|
|
61
142
|
}
|
|
@@ -57,6 +57,17 @@ export type PersistentVolumeClaims = {
|
|
|
57
57
|
capacity?: string
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
export type ListClusterNodesRequest = {
|
|
61
|
+
cluster?: string
|
|
62
|
+
resourceFlavor?: string
|
|
63
|
+
page?: BaizeCommonCommon.Pagination
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type ListClusterNodesResponse = {
|
|
67
|
+
items?: BaizeCommonCommon.Node[]
|
|
68
|
+
page?: BaizeCommonCommon.Pagination
|
|
69
|
+
}
|
|
70
|
+
|
|
60
71
|
export type ListPVCsRequest = {
|
|
61
72
|
workspace?: number
|
|
62
73
|
cluster?: string
|
|
@@ -73,7 +84,6 @@ export type GPUSetting = {
|
|
|
73
84
|
type?: string
|
|
74
85
|
alias?: string
|
|
75
86
|
resource?: GPUResourceSetting[]
|
|
76
|
-
maxUnits?: number
|
|
77
87
|
}
|
|
78
88
|
|
|
79
89
|
export type GPUResourceSetting = {
|
|
@@ -146,7 +156,7 @@ export class ClusterService {
|
|
|
146
156
|
static ListPVCs(req: ListPVCsRequest, initReq?: fm.InitReq): Promise<ListPVCsResponse> {
|
|
147
157
|
return fm.fetchReq<ListPVCsRequest, ListPVCsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/pvcs?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
148
158
|
}
|
|
149
|
-
static
|
|
159
|
+
static ListClusterGPUSettings(req: ClusterSettingsRequest, initReq?: fm.InitReq): Promise<GPUSettingsResponse> {
|
|
150
160
|
return fm.fetchReq<ClusterSettingsRequest, GPUSettingsResponse>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/settings/gpu-resources?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
151
161
|
}
|
|
152
162
|
static ListStorageClasses(req: ListStorageClassesRequest, initReq?: fm.InitReq): Promise<ListStorageClassesResponse> {
|
|
@@ -155,4 +165,7 @@ export class ClusterService {
|
|
|
155
165
|
static ListResourceAffinities(req: ListResourceAffinitiesRequest, initReq?: fm.InitReq): Promise<ListResourceAffinitiesResponse> {
|
|
156
166
|
return fm.fetchReq<ListResourceAffinitiesRequest, ListResourceAffinitiesResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/resource-affinities?${fm.renderURLSearchParams(req, ["workspace", "cluster"])}`, {...initReq, method: "GET"})
|
|
157
167
|
}
|
|
168
|
+
static ListClusterNodes(req: ListClusterNodesRequest, initReq?: fm.InitReq): Promise<ListClusterNodesResponse> {
|
|
169
|
+
return fm.fetchReq<ListClusterNodesRequest, ListClusterNodesResponse>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/nodes?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
170
|
+
}
|
|
158
171
|
}
|
|
@@ -109,8 +109,6 @@ export type Dataset = {
|
|
|
109
109
|
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
110
110
|
labels?: {[key: string]: string}
|
|
111
111
|
annotations?: {[key: string]: string}
|
|
112
|
-
share?: boolean
|
|
113
|
-
sharedToWorkspaces?: BaizeManagement_apiWorkspaceV1alpha1Workspace.Workspace[]
|
|
114
112
|
boundPVC?: DatasetBoundPVC
|
|
115
113
|
lastSync?: GoogleProtobufTimestamp.Timestamp
|
|
116
114
|
resources?: BaizeCommonK8s.Resources
|
|
@@ -159,7 +157,7 @@ export type DataSourceOptionsHttp = {
|
|
|
159
157
|
}
|
|
160
158
|
|
|
161
159
|
export type DataSourceOptionsReference = {
|
|
162
|
-
sourceWorkspace?:
|
|
160
|
+
sourceWorkspace?: BaizeManagement_apiWorkspaceV1alpha1Workspace.Workspace
|
|
163
161
|
}
|
|
164
162
|
|
|
165
163
|
|
|
@@ -87,10 +87,11 @@ export type Queue = {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
export type ListQueueRequest = {
|
|
90
|
+
workspace?: number
|
|
90
91
|
cluster?: string
|
|
91
92
|
type?: QueueType
|
|
93
|
+
resourceFlavor?: string
|
|
92
94
|
page?: BaizeCommonCommon.Pagination
|
|
93
|
-
workspace?: number
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
export type ListQueueResponse = {
|
|
@@ -202,12 +203,15 @@ export type ListQueueWorkloadResponse = {
|
|
|
202
203
|
|
|
203
204
|
export type ResourceFlavor = {
|
|
204
205
|
name?: string
|
|
206
|
+
cluster?: string
|
|
205
207
|
topologyName?: string
|
|
206
|
-
|
|
208
|
+
nodes?: string[]
|
|
209
|
+
nodeTaints?: BaizeCommonCommon.Taint[]
|
|
210
|
+
tolerations?: BaizeCommonCommon.Toleration[]
|
|
211
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
207
212
|
}
|
|
208
213
|
|
|
209
214
|
export type ListKueueResourceFlavorsRequest = {
|
|
210
|
-
workspace?: number
|
|
211
215
|
cluster?: string
|
|
212
216
|
page?: BaizeCommonCommon.Pagination
|
|
213
217
|
}
|
|
@@ -217,28 +221,49 @@ export type ListKueueResourceFlavorsResponse = {
|
|
|
217
221
|
page?: BaizeCommonCommon.Pagination
|
|
218
222
|
}
|
|
219
223
|
|
|
224
|
+
export type TopologyLevel = {
|
|
225
|
+
nodeLabel?: string
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export type Topology = {
|
|
229
|
+
name?: string
|
|
230
|
+
levels?: TopologyLevel[]
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export type ListKueueTopologiesRequest = {
|
|
234
|
+
cluster?: string
|
|
235
|
+
page?: BaizeCommonCommon.Pagination
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export type ListKueueTopologiesResponse = {
|
|
239
|
+
items?: Topology[]
|
|
240
|
+
page?: BaizeCommonCommon.Pagination
|
|
241
|
+
}
|
|
242
|
+
|
|
220
243
|
export type CreateResourceFlavorRequest = {
|
|
221
|
-
workspace?: number
|
|
222
244
|
cluster?: string
|
|
223
245
|
name?: string
|
|
224
|
-
|
|
246
|
+
topologyName?: string
|
|
247
|
+
nodes?: string[]
|
|
248
|
+
nodeTaints?: BaizeCommonCommon.Taint[]
|
|
249
|
+
tolerations?: BaizeCommonCommon.Toleration[]
|
|
225
250
|
}
|
|
226
251
|
|
|
227
252
|
export type UpdateResourceFlavorRequest = {
|
|
228
|
-
workspace?: number
|
|
229
253
|
cluster?: string
|
|
230
254
|
name?: string
|
|
231
|
-
|
|
255
|
+
topologyName?: string
|
|
256
|
+
nodes?: string[]
|
|
257
|
+
nodeTaints?: BaizeCommonCommon.Taint[]
|
|
258
|
+
tolerations?: BaizeCommonCommon.Toleration[]
|
|
232
259
|
}
|
|
233
260
|
|
|
234
261
|
export type GetResourceFlavorRequest = {
|
|
235
|
-
workspace?: number
|
|
236
262
|
cluster?: string
|
|
237
263
|
name?: string
|
|
238
264
|
}
|
|
239
265
|
|
|
240
266
|
export type DeleteResourceFlavorRequest = {
|
|
241
|
-
workspace?: number
|
|
242
267
|
cluster?: string
|
|
243
268
|
name?: string
|
|
244
269
|
}
|
|
@@ -275,15 +300,18 @@ export class QueueManagement {
|
|
|
275
300
|
return fm.fetchReq<ListKueueResourceFlavorsRequest, ListKueueResourceFlavorsResponse>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/kueue/resourceflavors?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
276
301
|
}
|
|
277
302
|
static CreateResourceFlavor(req: CreateResourceFlavorRequest, initReq?: fm.InitReq): Promise<ResourceFlavor> {
|
|
278
|
-
return fm.fetchReq<CreateResourceFlavorRequest, ResourceFlavor>(`/apis/baize.io/v1alpha1/
|
|
303
|
+
return fm.fetchReq<CreateResourceFlavorRequest, ResourceFlavor>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/kueue/resourceflavors`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
279
304
|
}
|
|
280
305
|
static UpdateResourceFlavor(req: UpdateResourceFlavorRequest, initReq?: fm.InitReq): Promise<ResourceFlavor> {
|
|
281
|
-
return fm.fetchReq<UpdateResourceFlavorRequest, ResourceFlavor>(`/apis/baize.io/v1alpha1/
|
|
306
|
+
return fm.fetchReq<UpdateResourceFlavorRequest, ResourceFlavor>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/kueue/resourceflavors/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
282
307
|
}
|
|
283
308
|
static GetResourceFlavor(req: GetResourceFlavorRequest, initReq?: fm.InitReq): Promise<ResourceFlavor> {
|
|
284
|
-
return fm.fetchReq<GetResourceFlavorRequest, ResourceFlavor>(`/apis/baize.io/v1alpha1/
|
|
309
|
+
return fm.fetchReq<GetResourceFlavorRequest, ResourceFlavor>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/kueue/resourceflavors/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"})
|
|
285
310
|
}
|
|
286
311
|
static DeleteResourceFlavor(req: DeleteResourceFlavorRequest, initReq?: fm.InitReq): Promise<ResourceFlavor> {
|
|
287
|
-
return fm.fetchReq<DeleteResourceFlavorRequest, ResourceFlavor>(`/apis/baize.io/v1alpha1/
|
|
312
|
+
return fm.fetchReq<DeleteResourceFlavorRequest, ResourceFlavor>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/kueue/resourceflavors/${req["name"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
313
|
+
}
|
|
314
|
+
static ListKueueTopologies(req: ListKueueTopologiesRequest, initReq?: fm.InitReq): Promise<ListKueueTopologiesResponse> {
|
|
315
|
+
return fm.fetchReq<ListKueueTopologiesRequest, ListKueueTopologiesResponse>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/kueue/topologies?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
288
316
|
}
|
|
289
317
|
}
|