mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-01 08:36:55 +02:00
use sync methods while updating the cluster
This commit is contained in:
@@ -193,7 +193,7 @@ func (c *Controller) processEvent(event spec.ClusterEvent) {
|
||||
return
|
||||
}
|
||||
c.curWorkerCluster.Store(event.WorkerID, cl)
|
||||
if err := cl.Update(event.NewSpec); err != nil {
|
||||
if err := cl.Update(event.OldSpec, event.NewSpec); err != nil {
|
||||
cl.Error = fmt.Errorf("could not update cluster: %v", err)
|
||||
lg.Error(cl.Error)
|
||||
|
||||
@@ -374,9 +374,6 @@ func (c *Controller) postgresqlUpdate(prev, cur interface{}) {
|
||||
if !ok {
|
||||
c.logger.Errorf("could not cast to postgresql spec")
|
||||
}
|
||||
if pgOld.ResourceVersion == pgNew.ResourceVersion {
|
||||
return
|
||||
}
|
||||
if reflect.DeepEqual(pgOld.Spec, pgNew.Spec) {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user