1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

Events take several minutes to show on the resource (#1083)

* git action added

* changed retry method

* remove time method

* increase worker for event generator
This commit is contained in:
Yuvraj 2020-08-26 14:28:34 +05:30 committed by GitHub
parent 513f5ec898
commit b648c2edd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -323,7 +323,7 @@ func main() {
go rWebhookWatcher.Run(stopCh) go rWebhookWatcher.Run(stopCh)
go configData.Run(stopCh) go configData.Run(stopCh)
go policyCtrl.Run(3, stopCh) go policyCtrl.Run(3, stopCh)
go eventGenerator.Run(1, stopCh) go eventGenerator.Run(3, stopCh)
go grc.Run(1, stopCh) go grc.Run(1, stopCh)
go grcc.Run(1, stopCh) go grcc.Run(1, stopCh)
go pvgen.Run(1, stopCh) go pvgen.Run(1, stopCh)

View file

@ -1,8 +1,6 @@
package event package event
import ( import (
"time"
"github.com/go-logr/logr" "github.com/go-logr/logr"
"github.com/nirmata/kyverno/pkg/client/clientset/versioned/scheme" "github.com/nirmata/kyverno/pkg/client/clientset/versioned/scheme"
@ -61,7 +59,7 @@ func NewEventGenerator(client *client.Client, pInformer kyvernoinformer.ClusterP
} }
func rateLimiter() workqueue.RateLimiter { func rateLimiter() workqueue.RateLimiter {
return workqueue.NewItemExponentialFailureRateLimiter(1*time.Second, 1000*time.Second) return workqueue.DefaultItemBasedRateLimiter()
} }
func initRecorder(client *client.Client, eventSource Source, log logr.Logger) record.EventRecorder { func initRecorder(client *client.Client, eventSource Source, log logr.Logger) record.EventRecorder {