Skip to content

Commit 2d65d56

Browse files
committed
Add missing patroni.switchover in pg-db
1 parent 3cf5403 commit 2d65d56

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

charts/pg-db/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ The chart can be customized using the following configurable parameters:
196196
| `patroni.dynamicConfiguration` | Custom PostgreSQL configuration options. Please note that configuration changes are automatically applied to the running instances without validation, so having an invalid config can make the cluster unavailable | `{}` |
197197
| `patroni.dynamicConfiguration.postgresql.parameters` | Custom PostgreSQL configuration options | `{}` |
198198
| `patroni.dynamicConfiguration.postgresql.pg_hba` | PostgreSQL Host-Based Authentication section | `{}` |
199+
| `patroni.switchover.enabled` | Enables or disables manual change of the cluster primary instance | `""` |
200+
| `patroni.switchover.targetInstance` | The name of the Pod that should be set as the new primary. When not specified, the new primary will be selected randomly | `""` |
199201
| `extensions.image` | Image for the custom PostgreSQL extension loader sidecar container | `""` |
200202
| `extensions.imagePullPolicy` | Policy for the custom extension sidecar container | `Always` |
201203
| `extensions.storage.type` | The cloud storage type used for backups. Only s3 type is currently supported. | `""` |

charts/pg-db/templates/cluster.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,13 @@ spec:
504504
dynamicConfiguration:
505505
{{- .Values.patroni.dynamicConfiguration | toYaml | nindent 6 }}
506506
{{- end }}
507+
{{- if .Values.patroni.switchover }}
508+
switchover:
509+
enabled: {{ .Values.patroni.switchover.enabled }}
510+
{{- if .Values.patroni.switchover.targetInstance }}
511+
targetInstance: {{ .Values.patroni.switchover.targetInstance }}
512+
{{- end }}
513+
{{- end }}
507514
{{- end }}
508515

509516
{{- if .Values.extensions }}

charts/pg-db/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,9 @@ pmm:
476476
# work_mem: 2MB
477477
# pg_hba:
478478
# - host all mytest 123.123.123.123/32 reject
479+
# switchover:
480+
# enabled: "true"
481+
# targetInstance: ""
479482

480483
# extensions:
481484
# image: percona/percona-postgresql-operator:2.4.0

0 commit comments

Comments
 (0)