Merge pull request #113986 from songxiao-wang87/runwxs-test2

Migrate StorageVersionGC to contextual logging
This commit is contained in:
Kubernetes Prow Robot
2023-03-07 04:19:43 -08:00
committed by GitHub
4 changed files with 38 additions and 22 deletions

View File

@@ -689,7 +689,9 @@ func setNodeCIDRMaskSizes(cfg nodeipamconfig.NodeIPAMControllerConfiguration, cl
}
func startStorageVersionGCController(ctx context.Context, controllerContext ControllerContext) (controller.Interface, bool, error) {
ctx = klog.NewContext(ctx, klog.LoggerWithName(klog.FromContext(ctx), "storageVersionGC"))
go storageversiongc.NewStorageVersionGC(
ctx,
controllerContext.ClientBuilder.ClientOrDie("storage-version-garbage-collector"),
controllerContext.InformerFactory.Coordination().V1().Leases(),
controllerContext.InformerFactory.Internal().V1alpha1().StorageVersions(),