diff --git a/exp/controllers/helpers.go b/exp/controllers/helpers.go index c289f40de6..14c7a09a9e 100644 --- a/exp/controllers/helpers.go +++ b/exp/controllers/helpers.go @@ -53,9 +53,9 @@ func GetOwnerMachinePool(ctx context.Context, c client.Client, obj metav1.Object } // KubeadmConfigToInfrastructureMapFunc returns a handler.ToRequestsFunc that watches for KubeadmConfig events and returns. -func KubeadmConfigToInfrastructureMapFunc(ctx context.Context, c client.Client, log logr.Logger) handler.MapFunc { +func KubeadmConfigToInfrastructureMapFunc(_ context.Context, c client.Client, log logr.Logger) handler.MapFunc { return func(ctx context.Context, o client.Object) []reconcile.Request { - _, cancel := context.WithTimeout(ctx, reconciler.DefaultMappingTimeout) + ctx, cancel := context.WithTimeout(ctx, reconciler.DefaultMappingTimeout) defer cancel() kc, ok := o.(*kubeadmv1.KubeadmConfig)