File tree Expand file tree Collapse file tree 2 files changed +2
-52
lines changed Expand file tree Collapse file tree 2 files changed +2
-52
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import (
4040 "github.com/Project-HAMi/HAMi/pkg/scheduler/config"
4141 "github.com/Project-HAMi/HAMi/pkg/scheduler/policy"
4242 "github.com/Project-HAMi/HAMi/pkg/util"
43+ "github.com/Project-HAMi/HAMi/pkg/util/client"
4344)
4445
4546type Scheduler struct {
@@ -72,12 +73,6 @@ func NewScheduler() *Scheduler {
7273 return s
7374}
7475
75- func check (err error ) {
76- if err != nil {
77- klog .Fatal (err )
78- }
79- }
80-
8176func (s * Scheduler ) onUpdateNode (_ , newObj interface {}) {
8277 s .nodeNotify <- struct {}{}
8378}
@@ -128,9 +123,7 @@ func (s *Scheduler) onDelPod(obj interface{}) {
128123
129124func (s * Scheduler ) Start () {
130125 klog .InfoS ("Starting HAMi scheduler components" )
131- kubeClient , err := k8sutil .NewClient ()
132- check (err )
133- s .kubeClient = kubeClient
126+ s .kubeClient = client .GetClient ()
134127 informerFactory := informers .NewSharedInformerFactoryWithOptions (s .kubeClient , time .Hour * 1 )
135128 s .podLister = informerFactory .Core ().V1 ().Pods ().Lister ()
136129 s .nodeLister = informerFactory .Core ().V1 ().Nodes ().Lister ()
You can’t perform that action at this time.
0 commit comments