diff --git a/operator/redisfailover/service/check.go b/operator/redisfailover/service/check.go index dd73d2a93..ace0d2d00 100644 --- a/operator/redisfailover/service/check.go +++ b/operator/redisfailover/service/check.go @@ -141,19 +141,11 @@ func (r *RedisFailoverChecker) CheckAllSlavesFromMaster(master string, rf *redis if err != nil { return err } - err = r.setMasterAnnotationIfNecessary(rf.Namespace, rp) - if err != nil { - return err - } } else { err = r.setSlaveLabelIfNecessary(rf.Namespace, rp) if err != nil { return err } - err = r.setSlaveAnnotationIfNecessary(rf.Namespace, rp) - if err != nil { - return err - } } slave, err := r.redisClient.GetSlaveOf(rp.Status.PodIP, rport, password) diff --git a/operator/redisfailover/service/heal.go b/operator/redisfailover/service/heal.go index 9a433cba8..3c36ed421 100644 --- a/operator/redisfailover/service/heal.go +++ b/operator/redisfailover/service/heal.go @@ -103,10 +103,6 @@ func (r *RedisFailoverHealer) MakeMaster(ip string, rf *redisfailoverv1.RedisFai if err != nil { return err } - err = r.setMasterAnnotationIfNecessary(rf.Namespace, rp) - if err != nil { - return err - } } } return nil @@ -148,10 +144,6 @@ func (r *RedisFailoverHealer) SetOldestAsMaster(rf *redisfailoverv1.RedisFailove if err != nil { return err } - err = r.setMasterAnnotationIfNecessary(rf.Namespace, pod) - if err != nil { - return err - } newMasterIP = pod.Status.PodIP } else { @@ -164,11 +156,6 @@ func (r *RedisFailoverHealer) SetOldestAsMaster(rf *redisfailoverv1.RedisFailove if err != nil { return err } - - err = r.setSlaveAnnotationIfNecessary(rf.Namespace, pod) - if err != nil { - return err - } } } if newMasterIP == "" { @@ -211,10 +198,6 @@ func (r *RedisFailoverHealer) SetMasterOnAll(masterIP string, rf *redisfailoverv if err != nil { return err } - err = r.setSlaveAnnotationIfNecessary(rf.Namespace, pod) - if err != nil { - return err - } } } return nil