diff --git a/charts/postgres-operator/crds/operatorconfigurations.yaml b/charts/postgres-operator/crds/operatorconfigurations.yaml index b10be5547..41acf834e 100644 --- a/charts/postgres-operator/crds/operatorconfigurations.yaml +++ b/charts/postgres-operator/crds/operatorconfigurations.yaml @@ -281,6 +281,9 @@ spec: oauth_token_secret_name: type: string default: "postgresql-operator" + pdb_master_label_selector: + type: boolean + default: true pdb_name_format: type: string default: "postgres-{cluster}-pdb" diff --git a/charts/postgres-operator/index.yaml b/charts/postgres-operator/index.yaml index d1df90d87..4ef58c5f0 100644 --- a/charts/postgres-operator/index.yaml +++ b/charts/postgres-operator/index.yaml @@ -3,10 +3,10 @@ entries: postgres-operator: - apiVersion: v2 appVersion: 1.11.0 - created: "2024-03-18T11:00:15.800881061+01:00" + created: "2024-03-27T16:11:07.44119096+01:00" description: Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes - digest: e043b8ff810b2e9b9158da5a28db55b1ab371607304f402d157911245974f16f + digest: 3914b5e117bda0834f05c9207f007e2ac372864cf6e86dcc2e1362bbe46c14d9 home: https://github.com/zalando/postgres-operator keywords: - postgres @@ -25,7 +25,7 @@ entries: version: 1.11.0 - apiVersion: v2 appVersion: 1.10.1 - created: "2024-03-18T11:00:15.798061899+01:00" + created: "2024-03-27T16:11:07.435516407+01:00" description: Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes digest: cc3baa41753da92466223d0b334df27e79c882296577b404a8e9071411fcf19c @@ -47,7 +47,7 @@ entries: version: 1.10.1 - apiVersion: v2 appVersion: 1.10.0 - created: "2024-03-18T11:00:15.795212886+01:00" + created: "2024-03-27T16:11:07.430181545+01:00" description: Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes digest: 60fc5c8059dfed175d14e1034b40997d9c59d33ec8ea158c0597f7228ab04b51 @@ -69,7 +69,7 @@ entries: version: 1.10.0 - apiVersion: v2 appVersion: 1.9.0 - created: "2024-03-18T11:00:15.812938635+01:00" + created: "2024-03-27T16:11:07.464139323+01:00" description: Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes digest: 64df90c898ca591eb3a330328173ffaadfbf9ddd474d8c42ed143edc9e3f4276 @@ -91,7 +91,7 @@ entries: version: 1.9.0 - apiVersion: v2 appVersion: 1.8.2 - created: "2024-03-18T11:00:15.809490671+01:00" + created: "2024-03-27T16:11:07.459140232+01:00" description: Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes digest: f77ffad2e98b72a621e5527015cf607935d3ed688f10ba4b626435acb9631b5b @@ -113,7 +113,7 @@ entries: version: 1.8.2 - apiVersion: v2 appVersion: 1.8.1 - created: "2024-03-18T11:00:15.806582514+01:00" + created: "2024-03-27T16:11:07.454211672+01:00" description: Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes digest: ee0c3bb6ba72fa4289ba3b1c6060e5b312dd023faba2a61b4cb7d9e5e2cc57a5 @@ -135,7 +135,7 @@ entries: version: 1.8.1 - apiVersion: v1 appVersion: 1.8.0 - created: "2024-03-18T11:00:15.803722471+01:00" + created: "2024-03-27T16:11:07.449062797+01:00" description: Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes digest: 3ae232cf009e09aa2ad11c171484cd2f1b72e63c59735e58fbe2b6eb842f4c86 @@ -155,4 +155,4 @@ entries: urls: - postgres-operator-1.8.0.tgz version: 1.8.0 -generated: "2024-03-18T11:00:15.778587784+01:00" +generated: "2024-03-27T16:11:07.42441665+01:00" diff --git a/charts/postgres-operator/postgres-operator-1.11.0.tgz b/charts/postgres-operator/postgres-operator-1.11.0.tgz index 9e6e3cf05..61c2eadb0 100644 Binary files a/charts/postgres-operator/postgres-operator-1.11.0.tgz and b/charts/postgres-operator/postgres-operator-1.11.0.tgz differ diff --git a/charts/postgres-operator/values.yaml b/charts/postgres-operator/values.yaml index 498efcbd2..2a5c572e6 100644 --- a/charts/postgres-operator/values.yaml +++ b/charts/postgres-operator/values.yaml @@ -169,7 +169,9 @@ configKubernetes: # namespaced name of the secret containing the OAuth2 token to pass to the teams API # oauth_token_secret_name: postgresql-operator - # defines the template for PDB (Pod Disruption Budget) names + # toggle if `spilo-role=master` selector should be added to the PDB (Pod Disruption Budget) + pdb_master_label_selector: true + # defines the template for PDB names pdb_name_format: "postgres-{cluster}-pdb" # specify the PVC retention policy when scaling down and/or deleting persistent_volume_claim_retention_policy: diff --git a/docs/reference/operator_parameters.md b/docs/reference/operator_parameters.md index 842cb022a..976c3b9ab 100644 --- a/docs/reference/operator_parameters.md +++ b/docs/reference/operator_parameters.md @@ -329,8 +329,8 @@ configuration they are grouped under the `kubernetes` key. * **pdb_master_label_selector** By default the PDB will match the master role hence preventing nodes to be - drained if the node_readiness_label is not used. This option if set to `false` - will not add the `spilo-role=master` selector to the PDB. + drained if the node_readiness_label is not used. If this option if set to + `false` the `spilo-role=master` selector will not be added to the PDB. * **enable_finalizers** By default, a deletion of the Postgresql resource will trigger an event diff --git a/manifests/configmap.yaml b/manifests/configmap.yaml index 42ef52995..ac06dcf76 100644 --- a/manifests/configmap.yaml +++ b/manifests/configmap.yaml @@ -119,6 +119,7 @@ data: patroni_api_check_timeout: "5s" # password_rotation_interval: "90" # password_rotation_user_retention: "180" + pdb_master_label_selector: "true" pdb_name_format: "postgres-{cluster}-pdb" persistent_volume_claim_retention_policy: "when_deleted:retain,when_scaled:retain" # pod_antiaffinity_preferred_during_scheduling: "false" diff --git a/manifests/operatorconfiguration.crd.yaml b/manifests/operatorconfiguration.crd.yaml index 2a7047950..3bcb5c330 100644 --- a/manifests/operatorconfiguration.crd.yaml +++ b/manifests/operatorconfiguration.crd.yaml @@ -279,6 +279,9 @@ spec: oauth_token_secret_name: type: string default: "postgresql-operator" + pdb_master_label_selector: + type: boolean + default: true pdb_name_format: type: string default: "postgres-{cluster}-pdb" diff --git a/manifests/postgresql-operator-default-configuration.yaml b/manifests/postgresql-operator-default-configuration.yaml index 3c7e08413..0fad31d1c 100644 --- a/manifests/postgresql-operator-default-configuration.yaml +++ b/manifests/postgresql-operator-default-configuration.yaml @@ -85,6 +85,7 @@ configuration: # status: ready # node_readiness_label_merge: "OR" oauth_token_secret_name: postgresql-operator + pdb_master_label_selector: true pdb_name_format: "postgres-{cluster}-pdb" persistent_volume_claim_retention_policy: when_deleted: "retain"