mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 17:30:33 +02:00
Avoid terminating delete on errors.
When there is an error happening upon deletion of the Kubernetes object belonging to the cluster being removed, it makes no sense to abort the deletion: the manifest will be removed anyway, therefore all the objects after the one we aborted at will stay forever.
This commit is contained in:
@@ -230,9 +230,7 @@ func (c *Controller) processEvent(event spec.ClusterEvent) {
|
||||
teamName := strings.ToLower(cl.Spec.TeamID)
|
||||
|
||||
c.curWorkerCluster.Store(event.WorkerID, cl)
|
||||
if err := cl.Delete(); err != nil {
|
||||
lg.Errorf("could not delete cluster: %v", err)
|
||||
}
|
||||
cl.Delete()
|
||||
|
||||
func() {
|
||||
defer c.clustersMu.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user