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:
parent
e4fe8a5b8d
commit
d5f2cefea0
1 changed files with 7 additions and 0 deletions
|
@ -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"),
|
||||
|
|
Loading…
Add table
Reference in a new issue