1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-13 19:28:55 +00:00

fix: run event generator to add audit mode events (#6083)

* run event generator

Signed-off-by: damilola olayinka <holayinkajr@gmail.com>

* start informers

Signed-off-by: damilola olayinka <holayinkajr@gmail.com>

* remove kubeinformer factory

Signed-off-by: damilola olayinka <holayinkajr@gmail.com>

Signed-off-by: damilola olayinka <holayinkajr@gmail.com>
This commit is contained in:
yinka 2023-01-23 21:25:33 +01:00 committed by GitHub
parent e4fe8a5b8d
commit d5f2cefea0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -288,6 +288,13 @@ func main() {
maxQueuedEvents,
logging.WithName("EventGenerator"),
)
// start informers and wait for cache sync
if !internal.StartInformersAndWaitForCacheSync(ctx, kyvernoInformer, kubeKyvernoInformer, cacheInformer) {
logger.Error(errors.New("failed to wait for cache sync"), "failed to wait for cache sync")
os.Exit(1)
}
// start event generator
go eventGenerator.Run(ctx, 3)
// setup leader election
le, err := leaderelection.New(
logger.WithName("leader-election"),