Merge pull request #113916 from songxiao-wang87/runwxs-test1

Migrate ttl_controller to contextual logging
This commit is contained in:
Kubernetes Prow Robot
2023-03-07 04:18:30 -08:00
committed by GitHub
4 changed files with 34 additions and 22 deletions

View File

@@ -490,7 +490,9 @@ func startServiceAccountController(ctx context.Context, controllerContext Contro
}
func startTTLController(ctx context.Context, controllerContext ControllerContext) (controller.Interface, bool, error) {
ctx = klog.NewContext(ctx, klog.LoggerWithName(klog.FromContext(ctx), "ttl"))
go ttlcontroller.NewTTLController(
ctx,
controllerContext.InformerFactory.Core().V1().Nodes(),
controllerContext.ClientBuilder.ClientOrDie("ttl-controller"),
).Run(ctx, 5)