zalando / zalando/postgres-operator
Add ClusterRole and ClusterRoleBinding to support using bypass_api_service patroni option
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.8.2
- 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? feature request
Hi team!
Patroni supports bypass_api_service option, which allows it to connect to kubernetes endpoints directly, instead going over KUBERNETES_SERVICE_HOST (which is usually some LB, pointing to master nodes). For resolving such endpoints, it queries /api/v1/namespaces/default/endpoints/kubernetes which should be explicitly allowed.
My proposal is to
- Create dedicated ClusterRole, to permit GET against
/api/v1/namespaces/default/endpoints/kubernetes - Create ClusterRoleBinding for pod service account (used by postgres & patroni pods), when cluster is created, by the means of operator.
Br, Alex
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 inspecting how the operator creates clusters, pod service accounts, and their RBAC resources. Use the linked Patroni kubernetes.py reference to confirm the required endpoint access; done means a dedicated ClusterRole and ClusterRoleBinding grant the requested pod service account GET access when a cluster is created.
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