Plumb event recorder to garbage collector controller

This commit is contained in:
Jordan Liggitt
2020-11-12 12:00:10 -05:00
parent 147a120948
commit 09bdf76b8a
5 changed files with 24 additions and 3 deletions

View File

@@ -33,6 +33,7 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/metadata"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/record"
"k8s.io/client-go/util/workqueue"
"k8s.io/controller-manager/pkg/informerfactory"
"k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly"
@@ -89,6 +90,8 @@ type GraphBuilder struct {
// it is protected by monitorLock.
running bool
eventRecorder record.EventRecorder
metadataClient metadata.Interface
// monitors are the producer of the graphChanges queue, graphBuilder alters
// the in-memory graph according to the changes.