zalando / zalando/postgres-operator
Global postgres parameters for all instances
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
- 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? Kubernetes or OpenShift? Bare Metal K8s
- Are you running Postgres Operator in production? yes
- Type of issue? question, feature request
Is it possible to add global parameters for all Postgres instances? We have almost all instances with the same logging parameters.
apiVersion: "acid.zalan.do/v1"
kind: postgresql
metadata:
name: db-name
namespace: default
spec:
...
postgresql:
version: "13"
parameters:
logging_collector: "off"
log_connections: "on"
log_disconnections: "on"
log_duration: "on"
log_min_duration_statement: "1000"
...
You have to transfer these parameters from one instance to another. It would be nice to describe them at the operator configuration level, rather than at the instance configuration level.
apiVersion: "acid.zalan.do/v1"
kind: OperatorConfiguration
metadata:
name: postgresql-operator-configuration
configuration:
...
parameters:
logging_collector: "off"
log_connections: "on"
log_disconnections: "on"
log_duration: "on"
log_min_duration_statement: "1000"
...
Priority is given to the instance configuration, and to override the operator's configuration if the parameters match.
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 tracing how OperatorConfiguration and the postgresql spec's parameters are read and applied to instances. Define the merge behavior so instance parameters override global values, then verify that shared logging parameters reach all instances while per-instance values take precedence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes, postgresql
- Domain
- databases, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100