mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-28 10:28:36 +00:00
refact: disable leader for update request controller (#3807)
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
This commit is contained in:
parent
d480f9f8f4
commit
2af9046e13
2 changed files with 5 additions and 2 deletions
|
@ -429,7 +429,6 @@ func main() {
|
|||
go certManager.Run(stopCh)
|
||||
go policyCtrl.Run(2, prgen.ReconcileCh, stopCh)
|
||||
go prgen.Run(1, stopCh)
|
||||
go urc.Run(genWorkers, stopCh)
|
||||
go grcc.Run(1, stopCh)
|
||||
}
|
||||
|
||||
|
@ -460,6 +459,7 @@ func main() {
|
|||
|
||||
// init events handlers
|
||||
// start Kyverno controllers
|
||||
go urc.Run(genWorkers, stopCh)
|
||||
go le.Run(ctx)
|
||||
go reportReqGen.Run(2, stopCh)
|
||||
go configurationController.Run(stopCh)
|
||||
|
|
|
@ -109,9 +109,12 @@ func NewController(
|
|||
|
||||
// Run starts workers
|
||||
func (c *Controller) Run(workers int, stopCh <-chan struct{}) {
|
||||
logger := c.log
|
||||
defer utilruntime.HandleCrash()
|
||||
defer c.queue.ShutDown()
|
||||
defer c.log.Info("shutting down")
|
||||
|
||||
logger.Info("starting")
|
||||
defer logger.Info("shutting down")
|
||||
|
||||
c.policyInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
|
||||
UpdateFunc: c.updatePolicy, // We only handle updates to policy
|
||||
|
|
Loading…
Add table
Reference in a new issue