first downscaler then inherited annotations
This commit is contained in:
parent
94eaef478d
commit
621c81fc52
|
|
@ -1174,13 +1174,13 @@ func (c *Cluster) generateStatefulSet(spec *acidv1.PostgresSpec) (*appsv1.Statef
|
|||
tolerationSpec := tolerations(&spec.Tolerations, c.OpConfig.PodToleration)
|
||||
effectivePodPriorityClassName := util.Coalesce(spec.PodPriorityClassName, c.OpConfig.PodPriorityClassName)
|
||||
|
||||
annotations := c.generatePodAnnotations(spec)
|
||||
podAnnotations := c.generatePodAnnotations(spec)
|
||||
|
||||
// generate pod template for the statefulset, based on the spilo container and sidecars
|
||||
podTemplate, err = c.generatePodTemplate(
|
||||
c.Namespace,
|
||||
c.labelsSet(true),
|
||||
c.annotationsSet(annotations),
|
||||
c.annotationsSet(podAnnotations),
|
||||
spiloContainer,
|
||||
initContainers,
|
||||
sidecarContainers,
|
||||
|
|
@ -1226,15 +1226,15 @@ 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)
|
||||
}
|
||||
|
||||
annotations = make(map[string]string)
|
||||
annotations[rollingUpdateStatefulsetAnnotationKey] = strconv.FormatBool(false)
|
||||
stsAnnotations := c.AnnotationsToPropagate(map[string]string{})
|
||||
stsAnnotations[rollingUpdateStatefulsetAnnotationKey] = strconv.FormatBool(false)
|
||||
|
||||
statefulSet := &appsv1.StatefulSet{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: c.statefulSetName(),
|
||||
Namespace: c.Namespace,
|
||||
Labels: c.labelsSet(true),
|
||||
Annotations: c.annotationsSet(c.AnnotationsToPropagate(annotations)),
|
||||
Annotations: c.annotationsSet(stsAnnotations),
|
||||
},
|
||||
Spec: appsv1.StatefulSetSpec{
|
||||
Replicas: &numberOfInstances,
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ func (c *Cluster) syncStatefulSet() error {
|
|||
}
|
||||
}
|
||||
annotations := c.AnnotationsToPropagate(c.Statefulset.Annotations)
|
||||
c.updateStatefulSetAnnotations(annotations)
|
||||
c.updateStatefulSetAnnotations(c.annotationsSet(annotations))
|
||||
|
||||
if !podsRollingUpdateRequired && !c.OpConfig.EnableLazySpiloUpgrade {
|
||||
// even if desired and actual statefulsets match
|
||||
|
|
|
|||
Loading…
Reference in New Issue