remove some comments and codelines
This commit is contained in:
parent
4421724848
commit
965d4423f1
|
|
@ -1303,7 +1303,6 @@ func (c *Cluster) generateStatefulSet(spec *acidv1.PostgresSpec) (*appsv1.Statef
|
||||||
|
|
||||||
func (c *Cluster) generatePodAnnotations(spec *acidv1.PostgresSpec) map[string]string {
|
func (c *Cluster) generatePodAnnotations(spec *acidv1.PostgresSpec) map[string]string {
|
||||||
annotations := make(map[string]string)
|
annotations := make(map[string]string)
|
||||||
// TODO annotations[rollingUpdatePodAnnotationKey] = strconv.FormatBool(false)
|
|
||||||
for k, v := range c.OpConfig.CustomPodAnnotations {
|
for k, v := range c.OpConfig.CustomPodAnnotations {
|
||||||
annotations[k] = v
|
annotations[k] = v
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,10 +77,8 @@ func (c *Cluster) enableRollingUpdateFlagForPod(pod v1.Pod, msg string) error {
|
||||||
// on pods that do not have it yet
|
// on pods that do not have it yet
|
||||||
func (c *Cluster) enableRollingUpdateFlagForPods(pods []v1.Pod, msg string) error {
|
func (c *Cluster) enableRollingUpdateFlagForPods(pods []v1.Pod, msg string) error {
|
||||||
for _, pod := range pods {
|
for _, pod := range pods {
|
||||||
if c.getRollingUpdateFlagFromPod(&pod, true) {
|
if err := c.enableRollingUpdateFlagForPod(pod, msg); err != nil {
|
||||||
if err := c.enableRollingUpdateFlagForPod(pod, msg); err != nil {
|
return fmt.Errorf("enabling rolling update flag failed for pod %q: %v", pod.Name, err)
|
||||||
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))
|
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 {
|
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)
|
return fmt.Errorf("could not recreate old master pod %q: %v", util.NameFromMeta(masterPod.ObjectMeta), err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// TODO rollingUpdatePodAnnotationKey = "zalando-postgres-operator-rolling-update-required"
|
|
||||||
rollingUpdatePodAnnotationKey = "zalando-postgres-operator-rolling-update-required"
|
rollingUpdatePodAnnotationKey = "zalando-postgres-operator-rolling-update-required"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue