zalando / zalando/postgres-operator
[Feature] Postgres cluster manifest in separate namespace than its child resources
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
Currently, at least as far as I understand the available configuration options, the postgres-operator will create the clusters or rather the related resources in the same namespace as the custom resource "postgresql" - https://github.com/zalando/postgres-operator/blob/master/pkg/cluster/cluster.go#L135
In order to allow folks to "request" a database, but to not have them access the actual pods, it would be nice to be able to configure a target namespace for the operator to create all those statefulsets, secrets and whatnot.
Provided there is some "external" authentication or db credentials are provided by something like Hashicorp Vault, there is actually "no need" to place the resources into the same namespace as i.e. the application in need of a database cluster.
Would you be open to add this feature or even accept a PR?
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
Read pkg/cluster/cluster.go around line 135 to trace how namespaces are selected for the PostgreSQL custom resource and its related resources. Define and implement a configuration path for a separate target namespace, then verify that StatefulSets, Secrets, and other cluster resources are created there while the custom resource remains in its original namespace.
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
- 38/100