diff --git a/pkg/cluster/k8sres.go b/pkg/cluster/k8sres.go index 2ac5cd31c..b942b9d1d 100644 --- a/pkg/cluster/k8sres.go +++ b/pkg/cluster/k8sres.go @@ -1303,7 +1303,6 @@ func (c *Cluster) generateStatefulSet(spec *acidv1.PostgresSpec) (*appsv1.Statef func (c *Cluster) generatePodAnnotations(spec *acidv1.PostgresSpec) map[string]string { annotations := make(map[string]string) - // TODO annotations[rollingUpdatePodAnnotationKey] = strconv.FormatBool(false) for k, v := range c.OpConfig.CustomPodAnnotations { annotations[k] = v } diff --git a/pkg/cluster/pod.go b/pkg/cluster/pod.go index f79cb8e80..091a3907d 100644 --- a/pkg/cluster/pod.go +++ b/pkg/cluster/pod.go @@ -77,10 +77,8 @@ func (c *Cluster) enableRollingUpdateFlagForPod(pod v1.Pod, msg string) error { // on pods that do not have it yet func (c *Cluster) enableRollingUpdateFlagForPods(pods []v1.Pod, msg string) error { for _, pod := range pods { - if c.getRollingUpdateFlagFromPod(&pod, true) { - if err := c.enableRollingUpdateFlagForPod(pod, msg); err != nil { - return fmt.Errorf("enabling rolling update flag failed for pod %q: %v", pod.Name, err) - } + if err := c.enableRollingUpdateFlagForPod(pod, msg); err != nil { + return fmt.Errorf("enabling rolling update flag failed for pod %q: %v", pod.Name, err) } } @@ -485,7 +483,6 @@ func (c *Cluster) recreatePods() error { } c.logger.Infof("recreating old master pod %q", util.NameFromMeta(masterPod.ObjectMeta)) - // TODO only if rolling update label is present if _, err := c.recreatePod(util.NameFromMeta(masterPod.ObjectMeta)); err != nil { return fmt.Errorf("could not recreate old master pod %q: %v", util.NameFromMeta(masterPod.ObjectMeta), err) } diff --git a/pkg/cluster/resources.go b/pkg/cluster/resources.go index a3110d2eb..8bd42bb68 100644 --- a/pkg/cluster/resources.go +++ b/pkg/cluster/resources.go @@ -19,7 +19,6 @@ import ( ) const ( - // TODO rollingUpdatePodAnnotationKey = "zalando-postgres-operator-rolling-update-required" rollingUpdatePodAnnotationKey = "zalando-postgres-operator-rolling-update-required" )