Skip to content

Make PodDisruptionBudget master label selector optional #2364

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

Merged
merged 3 commits into from
Jan 4, 2024

Conversation

b1zzu
Copy link
Contributor

@b1zzu b1zzu commented Jun 26, 2023

Fix: #1663

Introduce the pdb_master_label_selector config that by default is enabled but if disabled will not add the spilo-role: master match label to the cluster PodDisruptionBudget.

@b1zzu
Copy link
Contributor Author

b1zzu commented Jun 26, 2023

Hi,
I'm open to feedback for this PR, also I didn't know if they helm charts and manifests are autogenerated or if I have to take care of it

@elliottneilclark
Copy link

This is awesome and would help us to use PDBs with Postgres.
(bumping to the top of the review pile?)

@yoshihikoueno
Copy link
Contributor

@FxKu @Jan-M
Hi, I found this MR very useful and I'm sure many users out there also find the same way.
Could you have time to take a look at it?

@FxKu FxKu added this to the 2.0 milestone Aug 9, 2023
@@ -219,6 +219,7 @@ type Config struct {
ReplicaDNSNameFormat StringTemplate `name:"replica_dns_name_format" default:"{cluster}-repl.{namespace}.{hostedzone}"`
ReplicaLegacyDNSNameFormat StringTemplate `name:"replica_legacy_dns_name_format" default:"{cluster}-repl.{team}.{hostedzone}"`
PDBNameFormat StringTemplate `name:"pdb_name_format" default:"postgres-{cluster}-pdb"`
PDBMasterLabelSelector *bool `name:"pdb_master_label_selector" default:"true"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In line with the others why not call it enable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No good reason, I can rename it to EnablePDBMasterLabelSelector, it's a bit long but it follows the existing convention, wdyt?

@Jan-M
Copy link
Member

Jan-M commented Oct 14, 2023

@FxKu sounds like something useful to many people, tiny comment and then looks like we can tackle it.

I think it is important though for readers to understand that with this, you hand of to your infrastructure the responsibility to migrate masters only in healthy situations.

@FxKu
Copy link
Member

FxKu commented Jan 4, 2024

👍

1 similar comment
@idanovinda
Copy link
Member

👍

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

Successfully merging this pull request may close these issues.

PodDisruptionBudget blocks master disruption
6 participants