zalando / zalando/postgres-operator

sslmode=require is hard coded in zalando-operator initDbConn() method

Open
#2,366 2 comments 4 reactions 0 assignees View on GitHub

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? e.g. registry.opensource.zalan.do/acid/postgres-operator:v1.10.0
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? k8s
  • Are you running Postgres Operator in production? yes
  • Type of issue? question

In pgConnectionString() func that provides string to initDbConnWithName() sslmode=require is hard-coded, that means zalando-operator will not able to init db connection to non-SSL db cause connection will fail.

So, the question is: can I prepare a pull request to make this option configurable?
Or is there workaround how to avoid and make operator create and sync up clusters that set up with SSL disabled?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pkg/cluster/database.go at pgConnectionString() and follow how its result is passed to initDbConnWithName(). Reproduce the connection failure against a non-SSL PostgreSQL database and trace where the sslmode value is fixed; done means the operator can initialize and sync a cluster with SSL disabled without breaking the existing connection behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, postgresql
Domain
databases, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.