From e8dbb6a1a73dec6b0ebf24e1b37e70a3a56a8336 Mon Sep 17 00:00:00 2001 From: Joel Speed Date: Fri, 7 Feb 2020 11:00:58 +0000 Subject: [PATCH] Add context to remote clients --- controllers/machinehealthcheck_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/machinehealthcheck_controller.go b/controllers/machinehealthcheck_controller.go index e93aa571345a..e5a0195866f3 100644 --- a/controllers/machinehealthcheck_controller.go +++ b/controllers/machinehealthcheck_controller.go @@ -179,7 +179,7 @@ func (r *MachineHealthCheckReconciler) reconcile(ctx context.Context, cluster *c logger = logger.WithValues("cluster", cluster.Name) // Create client for target cluster - clusterClient, err := remote.NewClusterClient(r.Client, cluster, r.scheme) + clusterClient, err := remote.NewClusterClient(ctx, r.Client, cluster, r.scheme) if err != nil { logger.Error(err, "Error building target cluster client") return ctrl.Result{}, err @@ -352,7 +352,7 @@ func (r *MachineHealthCheckReconciler) watchClusterNodes(ctx context.Context, c return nil } - config, err := remote.RESTConfig(c, cluster) + config, err := remote.RESTConfig(ctx, c, cluster) if err != nil { return errors.Wrap(err, "error fetching remote cluster config") }