skip clusters with invalid spec

This commit is contained in:
Murat Kabilov
2017-05-16 16:46:37 +02:00
committed by GitHub
parent 1d2fb0091f
commit 356be8f0f1
6 changed files with 130 additions and 44 deletions
+4 -1
View File
@@ -369,7 +369,10 @@ func (c *Cluster) Update(newSpec *spec.Postgresql) error {
//TODO: update PVC
}
newStatefulSet := c.genStatefulSet(newSpec.Spec)
newStatefulSet, err := c.genStatefulSet(newSpec.Spec)
if err != nil {
return fmt.Errorf("Can't generate StatefulSet: %s", err)
}
sameSS, rollingUpdate, reason := c.compareStatefulSetWith(newStatefulSet)
if !sameSS {