From 146c1f3079c2dd2c8e9138231ccde1fea3264943 Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Fri, 9 Apr 2021 11:07:54 +0200 Subject: [PATCH] replace statefulset on annotation diff --- pkg/cluster/cluster.go | 1 + pkg/cluster/sync.go | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/cluster/cluster.go b/pkg/cluster/cluster.go index 424c8e89a..331da35e0 100644 --- a/pkg/cluster/cluster.go +++ b/pkg/cluster/cluster.go @@ -361,6 +361,7 @@ func (c *Cluster) compareStatefulSetWith(statefulSet *appsv1.StatefulSet) *compa } if !reflect.DeepEqual(c.Statefulset.Annotations, statefulSet.Annotations) { match = false + needsReplace = true reasons = append(reasons, "new statefulset's annotations do not match the current one") } diff --git a/pkg/cluster/sync.go b/pkg/cluster/sync.go index c82e528fd..3f08cfb4d 100644 --- a/pkg/cluster/sync.go +++ b/pkg/cluster/sync.go @@ -373,8 +373,6 @@ func (c *Cluster) syncStatefulSet() error { } } - c.updateStatefulSetAnnotations(c.AnnotationsToPropagate(c.annotationsSet(c.Statefulset.Annotations))) - if len(podsToRecreate) == 0 && !c.OpConfig.EnableLazySpiloUpgrade { // even if the desired and the running statefulsets match // there still may be not up-to-date pods on condition