remove annotation check as we do not pass patched pods to recreatePods

This commit is contained in:
Felix Kunde 2021-02-25 17:01:51 +01:00
parent eff531cbee
commit 2c0673ef17
2 changed files with 1 additions and 5 deletions

View File

@ -429,11 +429,6 @@ func (c *Cluster) recreatePods(pods []v1.Pod, switchoverCandidates []spec.Namesp
continue
}
// double check one more time if the rolling update flag is still there
if !c.getRollingUpdateFlagFromPod(&pod) {
continue
}
podName := util.NameFromMeta(pod.ObjectMeta)
newPod, err := c.recreatePod(podName)
if err != nil {

View File

@ -351,6 +351,7 @@ func (c *Cluster) syncStatefulSet() error {
if !cmp.match {
if cmp.rollingUpdate {
podsToRecreate = make([]v1.Pod, 0)
switchoverCandidates = make([]spec.NamespacedName, 0)
for _, pod := range pods {
if err = c.markRollingUpdateFlagForPod(&pod, "pod changes"); err != nil {
return fmt.Errorf("updating rolling update flag for pod failed: %v", err)