Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add label selector into master service #2565

Open
zhanshen8D opened this issue Mar 6, 2024 · 1 comment
Open

Add label selector into master service #2565

zhanshen8D opened this issue Mar 6, 2024 · 1 comment

Comments

@zhanshen8D
Copy link

zhanshen8D commented Mar 6, 2024

  • Which image of the operator are you using? postgres-operator:v1.10.0
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? cloud/Kubernetes
  • Are you running Postgres Operator in production? yes
  • Type of issue? feature request

Hi,
We would like to check the possibility with you to add label selector into master service of Postgres.
Currently the postgres-operator doesn't do that based on the logic in 'generateService()'.
It seems to be an intention according to the explanation in ticket #340

"The master service must not have a selector attached.
Patroni takes care of modifying the endpoint and add the IP of the master directly.
This avoids situations where more than one pod may in fact have the master label."

However, the patroni 3.1.0's doc has removed the recommendation of 'use the callback script provided by Patroni' and just keeps the 'To direct the traffic to the Postgres leader you need to configure the Kubernetes Postgres service to use the label selector with the role_label (configured in patroni configuration).'

So does it mean postgres-operator should add the label-selector into the master service to align with Patroni's recommendation?
Thanks.

@drivebyer
Copy link
Contributor

I am confused about this too. How should we connect to the master pod via the master service ClusterIP?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants