From 9d0e3672ee799a8cbf239bca959a77e6ee33158e Mon Sep 17 00:00:00 2001 From: Rafia Sabih Date: Thu, 30 Apr 2020 15:13:35 +0200 Subject: [PATCH] Avoid unneccessary update events --- pkg/controller/postgresql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/postgresql.go b/pkg/controller/postgresql.go index e4ebaa4ec..c243f330f 100644 --- a/pkg/controller/postgresql.go +++ b/pkg/controller/postgresql.go @@ -487,7 +487,7 @@ func (c *Controller) postgresqlUpdate(prev, cur interface{}) { if pgOld != nil && pgNew != nil { // Avoid the inifinite recursion for status updates if reflect.DeepEqual(pgOld.Spec, pgNew.Spec) { - if pgNew.Annotations != nil && pgOld.Annotations != nil && !reflect.DeepEqual(pgNew.Annotations, pgOld.Annotations) { + if reflect.DeepEqual(pgNew.Annotations, pgOld.Annotations) { return } }