From 67441f9fef0f2ba4ab0082b91d0255530ddbcc4a Mon Sep 17 00:00:00 2001 From: Fiachra Corcoran Date: Tue, 26 Mar 2024 17:34:42 +0000 Subject: [PATCH] Address some review comments --- .../pkg/controllers/packagevariant/packagevariant_controller.go | 2 +- .../packagevariantset/packagevariantset_controller.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/packagevariants/pkg/controllers/packagevariant/packagevariant_controller.go b/controllers/packagevariants/pkg/controllers/packagevariant/packagevariant_controller.go index 214ce45c..d2f1c8cf 100644 --- a/controllers/packagevariants/pkg/controllers/packagevariant/packagevariant_controller.go +++ b/controllers/packagevariants/pkg/controllers/packagevariant/packagevariant_controller.go @@ -737,7 +737,7 @@ func (r *PackageVariantReconciler) SetupWithManager(mgr ctrl.Manager) error { func mapObjectsToRequests(mgrClient client.Reader) handler.MapFunc { return func(ctx context.Context, obj client.Object) []reconcile.Request { attachedPackageVariants := &api.PackageVariantList{} - err := mgrClient.List(context.TODO(), attachedPackageVariants, &client.ListOptions{ + err := mgrClient.List(ctx, attachedPackageVariants, &client.ListOptions{ Namespace: obj.GetNamespace(), }) if err != nil { diff --git a/controllers/packagevariantsets/pkg/controllers/packagevariantset/packagevariantset_controller.go b/controllers/packagevariantsets/pkg/controllers/packagevariantset/packagevariantset_controller.go index 24c94d8a..292aa979 100644 --- a/controllers/packagevariantsets/pkg/controllers/packagevariantset/packagevariantset_controller.go +++ b/controllers/packagevariantsets/pkg/controllers/packagevariantset/packagevariantset_controller.go @@ -399,7 +399,7 @@ func (r *PackageVariantSetReconciler) SetupWithManager(mgr ctrl.Manager) error { func mapObjectsToRequests(mgrClient client.Reader) handler.MapFunc { return func(ctx context.Context, obj client.Object) []reconcile.Request { attachedPackageVariants := &api.PackageVariantSetList{} - err := mgrClient.List(context.TODO(), attachedPackageVariants, &client.ListOptions{ + err := mgrClient.List(ctx, attachedPackageVariants, &client.ListOptions{ Namespace: obj.GetNamespace(), }) if err != nil {