Skip to content

Commit 6ddafad

Browse files
authored
add pdb_master_label_selector to helm chart and example manifests (zalando#2595)
* add pdb_master_label_selector to helm chart and example manifests
1 parent be28f3a commit 6ddafad

8 files changed

+22
-12
lines changed

charts/postgres-operator/crds/operatorconfigurations.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ spec:
281281
oauth_token_secret_name:
282282
type: string
283283
default: "postgresql-operator"
284+
pdb_master_label_selector:
285+
type: boolean
286+
default: true
284287
pdb_name_format:
285288
type: string
286289
default: "postgres-{cluster}-pdb"

charts/postgres-operator/index.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ entries:
33
postgres-operator:
44
- apiVersion: v2
55
appVersion: 1.11.0
6-
created: "2024-03-18T11:00:15.800881061+01:00"
6+
created: "2024-03-27T16:11:07.44119096+01:00"
77
description: Postgres Operator creates and manages PostgreSQL clusters running
88
in Kubernetes
9-
digest: e043b8ff810b2e9b9158da5a28db55b1ab371607304f402d157911245974f16f
9+
digest: 3914b5e117bda0834f05c9207f007e2ac372864cf6e86dcc2e1362bbe46c14d9
1010
home: https://github.com/zalando/postgres-operator
1111
keywords:
1212
- postgres
@@ -25,7 +25,7 @@ entries:
2525
version: 1.11.0
2626
- apiVersion: v2
2727
appVersion: 1.10.1
28-
created: "2024-03-18T11:00:15.798061899+01:00"
28+
created: "2024-03-27T16:11:07.435516407+01:00"
2929
description: Postgres Operator creates and manages PostgreSQL clusters running
3030
in Kubernetes
3131
digest: cc3baa41753da92466223d0b334df27e79c882296577b404a8e9071411fcf19c
@@ -47,7 +47,7 @@ entries:
4747
version: 1.10.1
4848
- apiVersion: v2
4949
appVersion: 1.10.0
50-
created: "2024-03-18T11:00:15.795212886+01:00"
50+
created: "2024-03-27T16:11:07.430181545+01:00"
5151
description: Postgres Operator creates and manages PostgreSQL clusters running
5252
in Kubernetes
5353
digest: 60fc5c8059dfed175d14e1034b40997d9c59d33ec8ea158c0597f7228ab04b51
@@ -69,7 +69,7 @@ entries:
6969
version: 1.10.0
7070
- apiVersion: v2
7171
appVersion: 1.9.0
72-
created: "2024-03-18T11:00:15.812938635+01:00"
72+
created: "2024-03-27T16:11:07.464139323+01:00"
7373
description: Postgres Operator creates and manages PostgreSQL clusters running
7474
in Kubernetes
7575
digest: 64df90c898ca591eb3a330328173ffaadfbf9ddd474d8c42ed143edc9e3f4276
@@ -91,7 +91,7 @@ entries:
9191
version: 1.9.0
9292
- apiVersion: v2
9393
appVersion: 1.8.2
94-
created: "2024-03-18T11:00:15.809490671+01:00"
94+
created: "2024-03-27T16:11:07.459140232+01:00"
9595
description: Postgres Operator creates and manages PostgreSQL clusters running
9696
in Kubernetes
9797
digest: f77ffad2e98b72a621e5527015cf607935d3ed688f10ba4b626435acb9631b5b
@@ -113,7 +113,7 @@ entries:
113113
version: 1.8.2
114114
- apiVersion: v2
115115
appVersion: 1.8.1
116-
created: "2024-03-18T11:00:15.806582514+01:00"
116+
created: "2024-03-27T16:11:07.454211672+01:00"
117117
description: Postgres Operator creates and manages PostgreSQL clusters running
118118
in Kubernetes
119119
digest: ee0c3bb6ba72fa4289ba3b1c6060e5b312dd023faba2a61b4cb7d9e5e2cc57a5
@@ -135,7 +135,7 @@ entries:
135135
version: 1.8.1
136136
- apiVersion: v1
137137
appVersion: 1.8.0
138-
created: "2024-03-18T11:00:15.803722471+01:00"
138+
created: "2024-03-27T16:11:07.449062797+01:00"
139139
description: Postgres Operator creates and manages PostgreSQL clusters running
140140
in Kubernetes
141141
digest: 3ae232cf009e09aa2ad11c171484cd2f1b72e63c59735e58fbe2b6eb842f4c86
@@ -155,4 +155,4 @@ entries:
155155
urls:
156156
- postgres-operator-1.8.0.tgz
157157
version: 1.8.0
158-
generated: "2024-03-18T11:00:15.778587784+01:00"
158+
generated: "2024-03-27T16:11:07.42441665+01:00"
Binary file not shown.

charts/postgres-operator/values.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ configKubernetes:
169169
# namespaced name of the secret containing the OAuth2 token to pass to the teams API
170170
# oauth_token_secret_name: postgresql-operator
171171

172-
# defines the template for PDB (Pod Disruption Budget) names
172+
# toggle if `spilo-role=master` selector should be added to the PDB (Pod Disruption Budget)
173+
pdb_master_label_selector: true
174+
# defines the template for PDB names
173175
pdb_name_format: "postgres-{cluster}-pdb"
174176
# specify the PVC retention policy when scaling down and/or deleting
175177
persistent_volume_claim_retention_policy:

docs/reference/operator_parameters.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ configuration they are grouped under the `kubernetes` key.
329329

330330
* **pdb_master_label_selector**
331331
By default the PDB will match the master role hence preventing nodes to be
332-
drained if the node_readiness_label is not used. This option if set to `false`
333-
will not add the `spilo-role=master` selector to the PDB.
332+
drained if the node_readiness_label is not used. If this option if set to
333+
`false` the `spilo-role=master` selector will not be added to the PDB.
334334

335335
* **enable_finalizers**
336336
By default, a deletion of the Postgresql resource will trigger an event

manifests/configmap.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ data:
119119
patroni_api_check_timeout: "5s"
120120
# password_rotation_interval: "90"
121121
# password_rotation_user_retention: "180"
122+
pdb_master_label_selector: "true"
122123
pdb_name_format: "postgres-{cluster}-pdb"
123124
persistent_volume_claim_retention_policy: "when_deleted:retain,when_scaled:retain"
124125
# pod_antiaffinity_preferred_during_scheduling: "false"

manifests/operatorconfiguration.crd.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ spec:
279279
oauth_token_secret_name:
280280
type: string
281281
default: "postgresql-operator"
282+
pdb_master_label_selector:
283+
type: boolean
284+
default: true
282285
pdb_name_format:
283286
type: string
284287
default: "postgres-{cluster}-pdb"

manifests/postgresql-operator-default-configuration.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ configuration:
8585
# status: ready
8686
# node_readiness_label_merge: "OR"
8787
oauth_token_secret_name: postgresql-operator
88+
pdb_master_label_selector: true
8889
pdb_name_format: "postgres-{cluster}-pdb"
8990
persistent_volume_claim_retention_policy:
9091
when_deleted: "retain"

0 commit comments

Comments
 (0)