Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
gshaibi committed Jul 4, 2024
1 parent 73d1f1b commit e1823f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions internal/status-updater/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ func (app *StatusUpdaterApp) Init(stopCh chan struct{}) {
app.stopCh = stopCh

clusterConfig := InClusterConfigFn()
clusterConfig.QPS = 100
clusterConfig.Burst = 200

app.wg = &sync.WaitGroup{}

Expand Down
12 changes: 8 additions & 4 deletions internal/status-updater/controllers/node/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,16 @@ func NewNodeController(kubeClient kubernetes.Interface, wg *sync.WaitGroup) *Nod
},
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
node := obj.(*v1.Node)
util.LogErrorIfExist(c.handler.HandleAdd(node), "Failed to handle node addition")
go func() {
node := obj.(*v1.Node)
util.LogErrorIfExist(c.handler.HandleAdd(node), "Failed to handle node addition")
}()
},
DeleteFunc: func(obj interface{}) {
node := obj.(*v1.Node)
util.LogErrorIfExist(c.handler.HandleDelete(node), "Failed to handle node deletion")
go func() {
node := obj.(*v1.Node)
util.LogErrorIfExist(c.handler.HandleDelete(node), "Failed to handle node deletion")
}()
},
},
})
Expand Down

0 comments on commit e1823f2

Please sign in to comment.