From ed907964fa07d39e149ed2e066dc73083c4c8c4f Mon Sep 17 00:00:00 2001 From: Delyan Raychev Date: Mon, 2 May 2022 18:13:02 -0700 Subject: [PATCH] Simplify IAM Controller's Update fn Signed-off-by: Delyan Raychev --- controllers/iamrole_controller.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/controllers/iamrole_controller.go b/controllers/iamrole_controller.go index ee7b310..d9f1a27 100644 --- a/controllers/iamrole_controller.go +++ b/controllers/iamrole_controller.go @@ -368,10 +368,7 @@ func (StatusUpdatePredicate) Update(e event.UpdateEvent) bool { oldObj := e.ObjectOld.(*iammanagerv1alpha1.Iamrole) newObj := e.ObjectNew.(*iammanagerv1alpha1.Iamrole) - if oldObj.Status != newObj.Status { - return false - } - return true + return oldObj.Status == newObj.Status } //SetupWithManager sets up manager with controller