Skip to content

Commit

Permalink
cleanup: return frameworkruntime.NewFramework directly
Browse files Browse the repository at this point in the history
  • Loading branch information
binacs committed Dec 7, 2021
1 parent 0153feb commit ab41384
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/scheduler/profile/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package profile
import (
"errors"
"fmt"

"github.com/google/go-cmp/cmp"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes/scheme"
Expand All @@ -37,11 +38,7 @@ func newProfile(cfg config.KubeSchedulerProfile, r frameworkruntime.Registry, re
opts ...frameworkruntime.Option) (framework.Framework, error) {
recorder := recorderFact(cfg.SchedulerName)
opts = append(opts, frameworkruntime.WithEventRecorder(recorder))
fwk, err := frameworkruntime.NewFramework(r, &cfg, opts...)
if err != nil {
return nil, err
}
return fwk, nil
return frameworkruntime.NewFramework(r, &cfg, opts...)
}

// Map holds frameworks indexed by scheduler name.
Expand Down

0 comments on commit ab41384

Please sign in to comment.