mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Remove resync period for disruption controller
What type of PR is this? /kind cleanup What this PR does / why we need it: The disruption controller is resyncing all ssets every 30 seconds, this is not necessary, and make the depth of disruption workqueue longer and can cause delays processing actual updates when large amounts of disruptions exist. Special notes for your reviewer: Does this PR introduce a user-facing change? Disruption controllers no longer force a resync every 30 seconds when nothing has changed.
This commit is contained in:
parent
865cbf0bdf
commit
8e1e1e9be2
@ -140,13 +140,12 @@ func NewDisruptionController(
|
||||
dc.podLister = podInformer.Lister()
|
||||
dc.podListerSynced = podInformer.Informer().HasSynced
|
||||
|
||||
pdbInformer.Informer().AddEventHandlerWithResyncPeriod(
|
||||
pdbInformer.Informer().AddEventHandler(
|
||||
cache.ResourceEventHandlerFuncs{
|
||||
AddFunc: dc.addDb,
|
||||
UpdateFunc: dc.updateDb,
|
||||
DeleteFunc: dc.removeDb,
|
||||
},
|
||||
30*time.Second,
|
||||
)
|
||||
dc.pdbLister = pdbInformer.Lister()
|
||||
dc.pdbListerSynced = pdbInformer.Informer().HasSynced
|
||||
|
Loading…
Reference in New Issue
Block a user