mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-05 00:12:56 +02:00
compare revision hash instead of spec
This commit is contained in:
+1
-2
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"reflect"
|
||||
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
@@ -344,7 +343,7 @@ func (c *Cluster) recreatePods() error {
|
||||
role := PostgresRole(pod.Labels[c.OpConfig.PodRoleLabel])
|
||||
|
||||
// final check if spec of running pod differs from template
|
||||
if reflect.DeepEqual(pod.Spec, c.Statefulset.Spec.Template.Spec) {
|
||||
if pod.ObjectMeta.Labels["controller-revision-hash"] == c.Statefulset.Status.CurrentRevision {
|
||||
c.logger.Infof("%q pod %q already updated", role, podName)
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user