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

PodDisruptionBudget's more flexible configuration #2840

Open
vramperez opened this issue Jan 16, 2025 · 0 comments
Open

PodDisruptionBudget's more flexible configuration #2840

vramperez opened this issue Jan 16, 2025 · 0 comments

Comments

@vramperez
Copy link

Please, answer some short questions which should help us to understand your problem / question better?

  • Which image of the operator are you using? ghcr.io/zalando/postgres-operator:v1.13.0
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? AWS EKS, Metal (rke2, minikube)
  • Are you running Postgres Operator in production? Yes
  • Type of issue? Feature request

I feel that the podDisruptionBudget should be more flexible in its configuration, allowing to configure the pdb parameters as minAvailable and maxUnavailable, as currently you can only configure to enable the pdb (enable_pod_disruption_budget) and to include or not the master label in the selector (pdb_master_label_selector).

I understand the need to remove the master label from the selector, e.g. to allow node upgrades (we ourselves have had the same problem whenever we upgraded EKS). However, if you disable the master label, since you can't configure anything else in the PDB, you get a PDB that is not very useful. For example, for a case of 3 replicas, you would be left with a PDB that allowed 2 disruptions, which would lose quorum:

NAME                              MIN AVAILABLE   MAX UNAVAILABLE   ALLOWED DISRUPTIONS   AGE
postgres-ghale-psql-cluster-pdb   1               N/A               2                     10m

Wouldn't it be better to be able to configure the minAvailable and maxUnavailable parameters? In this way, by disabling the master label in PDB, you could configure a PDB with a maxUnavailable 2 for the case of 3 replicas, and you would be sure not to lose the quorum.

Maybe I'm misunderstanding something, or maybe removing the master label is intended to be only temporary, for example, while you upgrade, but this seems a bit weird IMO.

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

1 participant