Skip to content

Commit

Permalink
Fix predicates of paddlepaddle-controller for scheduling.volcano.sh/v…
Browse files Browse the repository at this point in the history
…1beta1 PodGroup (#1730)

Signed-off-by: Yuki Iwai <[email protected]>

Signed-off-by: Yuki Iwai <[email protected]>
  • Loading branch information
tenzen-y authored Jan 18, 2023
1 parent b87c6fa commit 1d88c0e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/controller.v1/paddlepaddle/paddlepaddle_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ func (r *PaddleJobReconciler) SetupWithManager(mgr ctrl.Manager, controllerThrea
}); err != nil {
return err
}

// skip watching podgroup if podgroup is not installed
_, err = mgr.GetRESTMapper().RESTMapping(schema.GroupKind{Group: v1beta1.SchemeGroupVersion.Group, Kind: "PodGroup"},
v1beta1.SchemeGroupVersion.Version)
Expand All @@ -221,9 +222,9 @@ func (r *PaddleJobReconciler) SetupWithManager(mgr ctrl.Manager, controllerThrea
IsController: true,
OwnerType: &kubeflowv1.PaddleJob{},
}, predicate.Funcs{
CreateFunc: util.OnDependentCreateFunc(r.Expectations),
UpdateFunc: util.OnDependentUpdateFunc(&r.JobController),
DeleteFunc: util.OnDependentDeleteFunc(r.Expectations),
CreateFunc: util.OnDependentCreateFuncGeneric(r.Expectations),
UpdateFunc: util.OnDependentUpdateFuncGeneric(&r.JobController),
DeleteFunc: util.OnDependentDeleteFuncGeneric(r.Expectations),
}); err != nil {
return err
}
Expand Down

0 comments on commit 1d88c0e

Please sign in to comment.