From 641c2052f493bf29d3f83765d4595edbeb2a9b80 Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Tue, 8 Dec 2020 15:19:51 +0100 Subject: [PATCH] set annotations in the same order it is done in other places --- pkg/cluster/k8sres.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/cluster/k8sres.go b/pkg/cluster/k8sres.go index 5d0e54ba9..5b4315718 100644 --- a/pkg/cluster/k8sres.go +++ b/pkg/cluster/k8sres.go @@ -1226,7 +1226,8 @@ func (c *Cluster) generateStatefulSet(spec *acidv1.PostgresSpec) (*appsv1.Statef return nil, fmt.Errorf("could not set the pod management policy to the unknown value: %v", c.OpConfig.PodManagementPolicy) } - stsAnnotations := c.AnnotationsToPropagate(map[string]string{}) + stsAnnotations := c.annotationsSet(map[string]string{}) + stsAnnotations = c.AnnotationsToPropagate(stsAnnotations) stsAnnotations[rollingUpdateStatefulsetAnnotationKey] = strconv.FormatBool(false) statefulSet := &appsv1.StatefulSet{ @@ -1234,7 +1235,7 @@ func (c *Cluster) generateStatefulSet(spec *acidv1.PostgresSpec) (*appsv1.Statef Name: c.statefulSetName(), Namespace: c.Namespace, Labels: c.labelsSet(true), - Annotations: c.annotationsSet(stsAnnotations), + Annotations: stsAnnotations, }, Spec: appsv1.StatefulSetSpec{ Replicas: &numberOfInstances,