zalando / zalando/postgres-operator
Unable to create pg_hba.conf config file
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
Please, answer some short questions which should help us to understand your problem / question better?
- Which image of the operator are you using? registry.opensource.zalan.do/acid/postgres-operator:v1.6.0
- **Where do you run it - cloud or metal? AWS K8s
- Are you running Postgres Operator in production? [yes | no]
- Type of issue? [Bug report, question, feature request, etc.]
Unable to create pg_hba.conf file on latest registry.opensource.zalan.do/acid/spilo-13:2.0-p5 based pods.
no matter what i do, i always get the same file, and its not properly configured to allow application to connect to database.
# Do not edit this file manually!
# It will be overwritten by Patroni!
local all all trust
hostssl all +zalandos 127.0.0.1/32 pam
host all all 127.0.0.1/32 md5
hostssl all +zalandos ::1/128 pam
host all all ::1/128 md5
hostssl replication standby all md5
hostnossl all all all reject
hostssl all +zalandos all pam
hostssl all all all md5
and we need to add this line:
host all all 0.0.0.0/0 md5
or at least edit this file somehow, probably via deployment k8s manifest.
I have added this into yaml file, nothing helps
patroni:
pg_hba: |
local all all trust
host all all 0.0.0.0/0 md5
host all all ::1/128 md5
hostssl all all all md5
hostssl all +zalandos all pam
hostssl all +zalandos 0.0.0.0/0 pam
hostssl all +zalandos ::1/128 pam
hostssl replication standby all md5
hostnossl all all all reject
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the patroni.pg_hba setting in the Kubernetes manifest with the generated /home/postgres/pgdata/pgroot/data/pg_hba.conf in the pod. Verify how the configuration is passed to Patroni and determine why the requested host rule is absent; done means the generated file contains the intended rule and permits the required application connection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, postgresql
- Domain
- databases, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100