Skip to content

Commit

Permalink
Merge pull request #3777 from vladfr/patch-1
Browse files Browse the repository at this point in the history
馃摉 Add context to handler func
  • Loading branch information
k8s-ci-robot committed Feb 13, 2024
2 parents 37790e0 + 79d63f6 commit be6ebe7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ func (r *ConfigDeploymentReconciler) SetupWithManager(mgr ctrl.Manager) error {
we just need to loop through the list and create a reconcile request for each one.
If an error occurs fetching the list, or no `ConfigDeployments` are found, then no reconcile requests will be returned.
*/
func (r *ConfigDeploymentReconciler) findObjectsForConfigMap(configMap client.Object) []reconcile.Request {
func (r *ConfigDeploymentReconciler) findObjectsForConfigMap(ctx context.Context, configMap client.Object) []reconcile.Request {
attachedConfigDeployments := &appsv1.ConfigDeploymentList{}
listOps := &client.ListOptions{
FieldSelector: fields.OneTermEqualSelector(configMapField, configMap.GetName()),
Namespace: configMap.GetNamespace(),
}
err := r.List(context.TODO(), attachedConfigDeployments, listOps)
err := r.List(ctx, attachedConfigDeployments, listOps)
if err != nil {
return []reconcile.Request{}
}
Expand All @@ -205,4 +205,4 @@ func (r *ConfigDeploymentReconciler) findObjectsForConfigMap(configMap client.Ob
}
}
return requests
}
}

0 comments on commit be6ebe7

Please sign in to comment.