add miss Shutdown call for selinux_warning controller

This commit is contained in:
googs1025
2025-04-14 09:07:51 +08:00
parent b15dfce6cb
commit e8dbfc0b6f

View File

@@ -350,6 +350,7 @@ func (c *Controller) Run(ctx context.Context, workers int) {
c.eventBroadcaster.StartStructuredLogging(3) // verbosity level 3 is used by the other KCM controllers
c.eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: c.kubeClient.CoreV1().Events("")})
defer c.eventBroadcaster.Shutdown()
if !cache.WaitForNamedCacheSync("selinux_warning", ctx.Done(), c.podsSynced, c.pvcsSynced, c.pvsSynced, c.csiDriversSynced) {
return