Pod GC controller - use node lister

This commit is contained in:
Jacek Kaniuk
2019-10-23 16:54:54 +02:00
parent e6e026f1ad
commit 39883f08bf
4 changed files with 315 additions and 107 deletions

View File

@@ -347,6 +347,7 @@ func startPodGCController(ctx ControllerContext) (http.Handler, bool, error) {
go podgc.NewPodGC(
ctx.ClientBuilder.ClientOrDie("pod-garbage-collector"),
ctx.InformerFactory.Core().V1().Pods(),
ctx.InformerFactory.Core().V1().Nodes(),
int(ctx.ComponentConfig.PodGCController.TerminatedPodGCThreshold),
).Run(ctx.Stop)
return nil, true, nil