Skip to content

Commit bb3065a

Browse files
authored
apis: add Gang api definition (#409)
Signed-off-by: wenshiqi <wen470366661@163.com>
1 parent 5bcb7a7 commit bb3065a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

apis/extension/scheduling.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,36 @@ const (
3333
// AnnotationReservationAllocated represents the reservation allocated by the pod.
3434
AnnotationReservationAllocated = SchedulingDomainPrefix + "/reservation-allocated"
3535
)
36+
const (
37+
AnnotationGangPrefix = "gang.scheduling.koordinator.sh"
38+
// AnnotationGangName specifies the name of the gang
39+
AnnotationGangName = AnnotationGangPrefix + "/name"
40+
41+
// AnnotationGangMinNum specifies the minimum number of the gang that can be executed
42+
AnnotationGangMinNum = AnnotationGangPrefix + "/min-available"
43+
44+
// AnnotationGangWaitTime specifies gang's max wait time in Permit Stage
45+
AnnotationGangWaitTime = AnnotationGangPrefix + "/waiting-time"
46+
47+
// AnnotationGangTotalNum specifies the total children number of the gang
48+
// If not specified,it will be set with the AnnotationGangMinNum
49+
AnnotationGangTotalNum = AnnotationGangPrefix + "/total-number"
50+
51+
// AnnotationGangMode defines the Gang Scheduling operation when failed scheduling
52+
// Support GangModeStrict and GangModeNonStrict, default is GangModeStrict
53+
AnnotationGangMode = AnnotationGangPrefix + "/mode"
54+
55+
// AnnotationGangGroups defines which gangs are bundled as a group
56+
// The gang will go to bind only all gangs in one group meet the conditions
57+
AnnotationGangGroups = AnnotationGangPrefix + "/groups"
58+
59+
// AnnotationGangTimeout means that the entire gang cannot be scheduled due to timeout
60+
// The annotation is added by the scheduler when the gang times out
61+
AnnotationGangTimeout = AnnotationGangPrefix + "/timeout"
62+
63+
GangModeStrict = "Strict"
64+
GangModeNonStrict = "NonStrict"
65+
)
3666

3767
// CustomUsageThresholds supports user-defined node resource utilization thresholds.
3868
type CustomUsageThresholds struct {

0 commit comments

Comments
 (0)