diff --git a/cmd/kyverno/main.go b/cmd/kyverno/main.go index 681b6bb95e..020dc9d02a 100755 --- a/cmd/kyverno/main.go +++ b/cmd/kyverno/main.go @@ -524,7 +524,6 @@ func main() { go reportReqGen.Run(2, stopCh) go configData.Run(stopCh) go eventGenerator.Run(3, stopCh) - go grgen.Run(10, stopCh) go pCacheController.Run(1, stopCh) go auditHandler.Run(10, stopCh) if !debug { diff --git a/pkg/webhooks/generate/generate.go b/pkg/webhooks/generate/generate.go index 1cb11b5a30..13ac31b38b 100644 --- a/pkg/webhooks/generate/generate.go +++ b/pkg/webhooks/generate/generate.go @@ -15,7 +15,6 @@ import ( admissionv1 "k8s.io/api/admission/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/cache" ) @@ -67,24 +66,6 @@ func (g *Generator) Apply(gr kyverno.GenerateRequestSpec, action admissionv1.Ope return nil } -// Run starts the generate request spec -func (g *Generator) Run(workers int, stopCh <-chan struct{}) { - logger := g.log - defer utilruntime.HandleCrash() - - logger.V(4).Info("starting") - defer func() { - logger.V(4).Info("shutting down") - }() - - if !cache.WaitForCacheSync(stopCh, g.grSynced) { - logger.Info("failed to sync informer cache") - return - } - - <-g.stopCh -} - func (g *Generator) processApply(m GeneratorChannel) { if err := g.generate(m.spec, m.action); err != nil { logger.Error(err, "failed to generate request CR")