mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 19:31:23 +02:00
Report new Postgres CR error when previously incorrect one is being updated (#449)
This commit is contained in:
committed by
Sergey Dudoladov
parent
38f7a3dac6
commit
1109c861fb
@@ -385,8 +385,14 @@ func (c *Controller) queueClusterEvent(informerOldSpec, informerNewSpec *acidv1.
|
||||
if informerOldSpec != nil { //update, delete
|
||||
uid = informerOldSpec.GetUID()
|
||||
clusterName = util.NameFromMeta(informerOldSpec.ObjectMeta)
|
||||
|
||||
// user is fixing previously incorrect spec
|
||||
if eventType == EventUpdate && informerNewSpec.Error == "" && informerOldSpec.Error != "" {
|
||||
eventType = EventSync
|
||||
}
|
||||
|
||||
// set current error to be one of the new spec if present
|
||||
if informerNewSpec != nil {
|
||||
clusterError = informerNewSpec.Error
|
||||
} else {
|
||||
clusterError = informerOldSpec.Error
|
||||
|
||||
Reference in New Issue
Block a user