Skip to content

Commit 70005b2

Browse files
authored
add field for supporting multi-cluster scheduling (volcano-sh#49)
Signed-off-by: william-wang <[email protected]>
1 parent 0879707 commit 70005b2

File tree

6 files changed

+124
-0
lines changed

6 files changed

+124
-0
lines changed

pkg/apis/batch/v1alpha1/labels.go

+8
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,12 @@ const (
3535
PodgroupNamePrefix = "podgroup-"
3636
// PodTemplateKey type specify a equivalence pod class
3737
PodTemplateKey = "volcano.sh/template-uid"
38+
// JobForwardingKey job forwarding key used in job annotation
39+
JobForwardingKey = "volcano.sh/job-forwarding"
40+
// ForwardClusterKey cluster key used in pod annotation
41+
ForwardClusterKey = "volcano.sh/forward-cluster"
42+
// OrginalNameKey annotation key for resource name
43+
OrginalNameKey = "volcano.sh/burst-name"
44+
// BurstToSiloClusterAnnotation labels key for resource only in silo cluster
45+
BurstToSiloClusterAnnotation = "volcano.sh/silo-resource"
3846
)

pkg/apis/scheduling/types.go

+10
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,13 @@ type QueueStatus struct {
278278
Reservation Reservation `json:"reservation,omitempty" protobuf:"bytes,6,opt,name=reservation"`
279279
}
280280

281+
// CluterSpec represents the template of Cluster
282+
type Cluster struct {
283+
Name string
284+
Weight int32
285+
Capacity v1.ResourceList
286+
}
287+
281288
// QueueSpec represents the template of Queue.
282289
type QueueSpec struct {
283290
Weight int32
@@ -288,6 +295,9 @@ type QueueSpec struct {
288295
// Reclaimable indicate whether the queue can be reclaimed by other queue
289296
Reclaimable *bool
290297

298+
// extendCluster indicate the jobs in this Queue will be dispatched to these clusters.
299+
ExtendClusters []Cluster
300+
291301
// Guarantee indicate configuration about resource reservation
292302
Guarantee Guarantee `json:"guarantee,omitempty" protobuf:"bytes,4,opt,name=guarantee"`
293303
}

pkg/apis/scheduling/v1beta1/types.go

+10
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,13 @@ type QueueStatus struct {
294294
Reservation Reservation `json:"reservation,omitempty" protobuf:"bytes,6,opt,name=reservation"`
295295
}
296296

297+
// CluterSpec represents the template of Cluster
298+
type Cluster struct {
299+
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
300+
Weight int32 `json:"weight,omitempty" protobuf:"bytes,2,opt,name=weight"`
301+
Capacity v1.ResourceList `json:"capacity,omitempty" protobuf:"bytes,3,opt,name=capacity"`
302+
}
303+
297304
// QueueSpec represents the template of Queue.
298305
type QueueSpec struct {
299306
Weight int32 `json:"weight,omitempty" protobuf:"bytes,1,opt,name=weight"`
@@ -302,6 +309,9 @@ type QueueSpec struct {
302309
// Reclaimable indicate whether the queue can be reclaimed by other queue
303310
Reclaimable *bool `json:"reclaimable,omitempty" protobuf:"bytes,3,opt,name=reclaimable"`
304311

312+
// extendCluster indicate the jobs in this Queue will be dispatched to these clusters.
313+
ExtendClusters []Cluster `json:"extendClusters,omitempty" protobuf:"bytes,4,opt,name=extendClusters"`
314+
305315
// Guarantee indicate configuration about resource reservation
306316
Guarantee Guarantee `json:"guarantee,omitempty" protobuf:"bytes,4,opt,name=guarantee"`
307317
}

pkg/apis/scheduling/v1beta1/zz_generated.conversion.go

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/scheduling/v1beta1/zz_generated.deepcopy.go

+30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/scheduling/zz_generated.deepcopy.go

+30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)