-
Notifications
You must be signed in to change notification settings - Fork 73
Make scheduler-plugins the default gang scheduler #209
Conversation
Sure. |
/hold |
@tenzen-y This PR is ready for review. PTAL. |
Can you squash commits into one? |
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/assign @johnugeorge
fec0139
to
34510ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a nit, otherwise lgtm
@@ -72,6 +72,8 @@ const ( | |||
GangSchedulerNone GangScheduler = "None" | |||
GangSchedulerVolcano GangScheduler = "volcano" | |||
GangSchedulerSchedulerPlugins GangScheduler = "scheduler-plugins" | |||
// GangSchedulerDefault Using this scheduler name or any scheduler name different than volcano uses the scheduler-plugins PodGroup | |||
GangSchedulerDefault GangScheduler = "default-scheduler" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove if this is not being used
/retitle Make scheduler-plugins the default gang scheduler |
@alculquicondor @tenzen-y @terrytangyuan all conversations are done, PTAL. |
@@ -164,6 +165,10 @@ func (r *SchedulerFrameworkReconciler) DecoratePodForGangScheduling( | |||
podTemplate *corev1.PodTemplateSpec, | |||
job client.Object, | |||
) { | |||
if podTemplate.Spec.SchedulerName == "" && r.GetGangSchedulerName() != "default-scheduler" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if podTemplate.Spec.SchedulerName == "" && r.GetGangSchedulerName() != "default-scheduler" { | |
if podTemplate.Spec.SchedulerName == "" { |
Let's use a logic the same as the podgroup_control.
I left a comment for nit. Overall, lgtm. |
Signed-off-by: Syulin7 <735122171@qq.com>
@Syulin7 Thanks for the great work! @johnugeorge
|
} | ||
|
||
// NewSchedulerPluginsControl returns a SchedulerPluginsControl | ||
func NewSchedulerPluginsControl(c client.Client) PodGroupControlInterface { | ||
return &SchedulerPluginsControl{Client: c} | ||
func NewSchedulerPluginsControl(c client.Client, schedulerName string) PodGroupControlInterface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not about this PR, but I realized that some functions below are unnecessary, like UpdatePodGroup
, and CreatePodGroup
. They are casting unnecessarily: the controller-runtime client can already handle the casting via reflection. And I think GetPodGroup
and DeletePodGroup
could be refactored so that we don't need the casting either. Maybe even use generics.
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: terrytangyuan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@tenzen-y The final release is not yet made due to delay in Kubeflow upstream. Sorry for the delay. This should not happen again in the future as we always branch out for all repos except common. We will target this week end to merge- Friday 24 March |
Thanks for letting me know! I appreciate your hard work! |
Training operator release is made. This can be merged. Thanks for the patience |
@Syulin7 Thank you! |
@johnugeorge Can we cut a new release on this repo to move forward kubeflow/training-operator#1747? |
What this PR does / why we need it:
Now supports many gang schedulers(volcano, scheduler-plugins). This PR supports koordinator gang scheduler.
Related: kubeflow/training-operator#1746