Skip to content

Postgres Operator has started to create a duplicated port since v1.8.0 #1863

@chitoku-k

Description

@chitoku-k
  • Which image of the operator are you using? registry.opensource.zalan.do/acid/postgres-operator:v1.8.0
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? Bare Metal K8s
  • Are you running Postgres Operator in production? yes
  • Type of issue? Bug report

After applying postgres-operator v1.8.0, kubelet starts to log the following, complaining that there are duplicate container mappings:

"Port name conflicted, it is defined more than once" portName="any-TCP-:8008:0"

and rolling back to v1.7.1 completely fixes this issue.

Trying to dig into this further, it turns out that the PR which introduces readinessProbe has a regression in this part:
https://github.com/zalando/postgres-operator/pull/1825/files#diff-e9c5b05262207b16b959659256e773d9158a1710b89d1b73eca6453888563130R560-R572

This patch duplicates patroni.ApiPort which is 8008 twice and results in the aforementioned error.

v1.7.1 v1.8.0
8008, 5432, 8080 8008, 5432, 8008

The port number 8080 has been hard-coded; however, it is a configurable port (REST API), so it should be passed down to this method.

Thank you for maintaining this project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions