Merge pull request #115332 from obaranov1/ttlafterfinished-logging-migration

Migrate /pkg/controller/ttlafterfinished to structured and contextual logging
This commit is contained in:
Kubernetes Prow Robot
2023-03-07 04:20:08 -08:00
committed by GitHub
3 changed files with 44 additions and 26 deletions

View File

@@ -565,7 +565,9 @@ func startPVProtectionController(ctx context.Context, controllerContext Controll
}
func startTTLAfterFinishedController(ctx context.Context, controllerContext ControllerContext) (controller.Interface, bool, error) {
ctx = klog.NewContext(ctx, klog.LoggerWithName(klog.FromContext(ctx), "ttlafterfinished"))
go ttlafterfinished.New(
ctx,
controllerContext.InformerFactory.Batch().V1().Jobs(),
controllerContext.ClientBuilder.ClientOrDie("ttl-after-finished-controller"),
).Run(ctx, int(controllerContext.ComponentConfig.TTLAfterFinishedController.ConcurrentTTLSyncs))