mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #106851 from BinacsLee/binacs/cleanup-scheduler-profile
cleanup: return frameworkruntime.NewFramework directly
This commit is contained in:
commit
b9977a7b17
@ -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"
|
||||
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user