replace statefulset on annotation diff

This commit is contained in:
Felix Kunde 2021-04-09 11:07:54 +02:00
parent 0745ce7cce
commit 146c1f3079
2 changed files with 1 additions and 2 deletions

View File

@ -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")
}

View File

@ -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