Skip to content

Commit

Permalink
fix issue-314 by checking zookeeperCluster resource version before up…
Browse files Browse the repository at this point in the history
…dating sts ADDENDUM (#355)

Fix owner-rv check by checking the existing STS object
  • Loading branch information
amuraru authored Jul 1, 2021
1 parent bd0d4ef commit b18f163
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ func (r *ReconcileZookeeperCluster) reconcileStatefulSet(instance *zookeeperv1be
return err
} else {
// check whether zookeeperCluster is updated before updating the sts
if !zookeeperClusterFresherThanSts(instance, sts) {
return fmt.Errorf("Staleness: cr.ResourceVersion %s is smaller than labeledRV %s", instance.ResourceVersion, sts.Labels["owner-rv"])
if !zookeeperClusterFresherThanSts(instance, foundSts) {
return fmt.Errorf("Staleness: cr.ResourceVersion %s is smaller than labeledRV %s", instance.ResourceVersion, foundSts.Labels["owner-rv"])
}
foundSTSSize := *foundSts.Spec.Replicas
newSTSSize := *sts.Spec.Replicas
Expand Down

0 comments on commit b18f163

Please sign in to comment.