migrated pkg/controller/endpointslice to contextual logging

Signed-off-by: Naman <namanlakhwani@gmail.com>
This commit is contained in:
Naman
2023-01-24 19:09:00 +05:30
parent c95b16b280
commit 09849b09cf
15 changed files with 186 additions and 132 deletions

View File

@@ -29,6 +29,7 @@ import (
func startEndpointSliceController(ctx context.Context, controllerContext ControllerContext) (controller.Interface, bool, error) {
go endpointslicecontroller.NewController(
ctx,
controllerContext.InformerFactory.Core().V1().Pods(),
controllerContext.InformerFactory.Core().V1().Services(),
controllerContext.InformerFactory.Core().V1().Nodes(),
@@ -36,7 +37,7 @@ func startEndpointSliceController(ctx context.Context, controllerContext Control
controllerContext.ComponentConfig.EndpointSliceController.MaxEndpointsPerSlice,
controllerContext.ClientBuilder.ClientOrDie("endpointslice-controller"),
controllerContext.ComponentConfig.EndpointSliceController.EndpointUpdatesBatchPeriod.Duration,
).Run(int(controllerContext.ComponentConfig.EndpointSliceController.ConcurrentServiceEndpointSyncs), ctx.Done())
).Run(ctx, int(controllerContext.ComponentConfig.EndpointSliceController.ConcurrentServiceEndpointSyncs))
return nil, true, nil
}