diff --git a/manifests/configmap.yaml b/manifests/configmap.yaml index 525e26725..74d3eaa77 100644 --- a/manifests/configmap.yaml +++ b/manifests/configmap.yaml @@ -94,7 +94,7 @@ data: # sidecar_docker_images: "" # set_memory_request_to_limit: "false" spilo_privileged: "false" - # statefulset_propagate_annotation: "deployment-time,downscaler/*" + # statefulset_propagate_annotations: "deployment-time,downscaler/*" super_username: postgres # team_admin_role: "admin" # team_api_role_configuration: "log_statement:all" diff --git a/manifests/postgresql-operator-default-configuration.yaml b/manifests/postgresql-operator-default-configuration.yaml index 479aac765..ae256f799 100644 --- a/manifests/postgresql-operator-default-configuration.yaml +++ b/manifests/postgresql-operator-default-configuration.yaml @@ -4,7 +4,7 @@ metadata: name: postgresql-operator-default-configuration configuration: docker_image: registry.opensource.zalan.do/acid/spilo-cdp-12:1.6-p115 - # statefulset_propagate_annotation: + # statefulset_propagate_annotations: # - deployment-time # - downscaler/* # enable_crd_validation: true diff --git a/pkg/cluster/resources.go b/pkg/cluster/resources.go index ac1437540..3528c46f4 100644 --- a/pkg/cluster/resources.go +++ b/pkg/cluster/resources.go @@ -869,7 +869,7 @@ func (c *Cluster) updateConnectionPoolerAnnotations(annotations map[string]strin metav1.PatchOptions{}, "") if err != nil { - return nil, fmt.Errorf("could not patch conenction pooler annotations %q: %v", patchData, err) + return nil, fmt.Errorf("could not patch connection pooler annotations %q: %v", patchData, err) } return result, nil diff --git a/pkg/cluster/sync.go b/pkg/cluster/sync.go index e5dfc0ceb..2f146f699 100644 --- a/pkg/cluster/sync.go +++ b/pkg/cluster/sync.go @@ -403,12 +403,12 @@ func (c *Cluster) syncStatefulSet() error { // AnnotationsToPropagate get the annotations to update if required // based on the annotations in postgres CRD func (c *Cluster) AnnotationsToPropagate(annotations map[string]string) map[string]string { - ToPropagateAnnotations := c.OpConfig.StatefulsetPropagateAnnotations - PgCRDAnnotations := c.Postgresql.ObjectMeta.GetAnnotations() + toPropagateAnnotations := c.OpConfig.StatefulsetPropagateAnnotations + pgCRDAnnotations := c.Postgresql.ObjectMeta.GetAnnotations() - if ToPropagateAnnotations != nil && PgCRDAnnotations != nil { - for _, anno := range ToPropagateAnnotations { - for k, v := range PgCRDAnnotations { + if toPropagateAnnotations != nil && pgCRDAnnotations != nil { + for _, anno := range toPropagateAnnotations { + for k, v := range pgCRDAnnotations { matched, err := regexp.MatchString(anno, k) if err != nil { c.logger.Errorf("annotations matching issue: %v", err)