Avoid unneccessary update events

This commit is contained in:
Rafia Sabih 2020-04-30 15:13:35 +02:00
parent 01dfbe6314
commit 9d0e3672ee
1 changed files with 1 additions and 1 deletions

View File

@ -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
}
}