mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-07 19:15:04 +02:00
skip creation later to improve visibility of errors (#1013)
* try to emit error for missing team name in cluster name * skip creation after new cluster object * move SetStatus to k8sclient and emit event when skipping creation and rename to SetPostgresCRDStatus Co-authored-by: Felix Kunde <felix.kunde@zalando.de>
This commit is contained in:
co-authored by
Felix Kunde
parent
0e3fb9ec43
commit
0c6655a22d
+2
-2
@@ -32,9 +32,9 @@ func (c *Cluster) Sync(newSpec *acidv1.Postgresql) error {
|
||||
defer func() {
|
||||
if err != nil {
|
||||
c.logger.Warningf("error while syncing cluster state: %v", err)
|
||||
c.setStatus(acidv1.ClusterStatusSyncFailed)
|
||||
c.KubeClient.SetPostgresCRDStatus(c.clusterName(), acidv1.ClusterStatusSyncFailed)
|
||||
} else if !c.Status.Running() {
|
||||
c.setStatus(acidv1.ClusterStatusRunning)
|
||||
c.KubeClient.SetPostgresCRDStatus(c.clusterName(), acidv1.ClusterStatusRunning)
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user