From bc6784681bd73753d51600f33afa08e9db0113bb Mon Sep 17 00:00:00 2001 From: Max Brauer Date: Sun, 8 May 2022 17:05:17 +0200 Subject: [PATCH] Add missing parent to invocation of ChildReconciler.OurChild --- reconcilers/reconcilers.go | 1 + reconcilers/reconcilers_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/reconcilers/reconcilers.go b/reconcilers/reconcilers.go index e377a66..9bb2237 100644 --- a/reconcilers/reconcilers.go +++ b/reconcilers/reconcilers.go @@ -1072,6 +1072,7 @@ func (r *ChildReconciler) ourChild(parent, obj client.Object) bool { } fn := reflect.ValueOf(r.OurChild) out := fn.Call([]reflect.Value{ + reflect.ValueOf(parent), reflect.ValueOf(obj), }) keep := true diff --git a/reconcilers/reconcilers_test.go b/reconcilers/reconcilers_test.go index 5b09ccc..4f1758c 100644 --- a/reconcilers/reconcilers_test.go +++ b/reconcilers/reconcilers_test.go @@ -930,7 +930,7 @@ func TestChildReconciler(t *testing.T) { Metadata: map[string]interface{}{ "SubReconciler": func(t *testing.T, c reconcilers.Config) reconcilers.SubReconciler { r := defaultChildReconciler(c) - r.OurChild = func(child *corev1.ConfigMap) bool { + r.OurChild = func(parent *resources.TestResource, child *corev1.ConfigMap) bool { return false } return r