Skip to content

Commit 11feb2e

Browse files
committed
add synchronous config
Signed-off-by: Patrick Pfenning <[email protected]>
1 parent 3680ee5 commit 11feb2e

File tree

6 files changed

+20
-0
lines changed

6 files changed

+20
-0
lines changed

charts/cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentat
168168
| cluster.postgresGID | int | `-1` | The GID of the postgres user inside the image, defaults to 26 |
169169
| cluster.postgresUID | int | `-1` | The UID of the postgres user inside the image, defaults to 26 |
170170
| cluster.postgresql.parameters | object | `{}` | PostgreSQL configuration options (postgresql.conf) |
171+
| cluster.postgresql.synchronous | object | `{}` | SynchronousReplicaConfiguration. See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-SynchronousReplicaConfiguration |
171172
| cluster.postgresql.pg_hba | list | `[]` | PostgreSQL Host Based Authentication rules (lines to be appended to the pg_hba.conf file) |
172173
| cluster.postgresql.pg_ident | list | `[]` | PostgreSQL User Name Maps rules (lines to be appended to the pg_ident.conf file) |
173174
| cluster.postgresql.shared_preload_libraries | list | `[]` | Lists of shared preload libraries to add to the default ones |

charts/cluster/templates/cluster.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ spec:
6666
{{- toYaml .pg_hba | nindent 6 }}
6767
pg_ident:
6868
{{- toYaml .pg_ident | nindent 6 }}
69+
synchronous:
70+
{{- toYaml .synchronous | nindent 6 }}
6971
{{ end }}
7072

7173
managed:

charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster-assert.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ spec:
2121
- mymap /^(.*)@mydomain\.com$ \1
2222
shared_preload_libraries:
2323
- pgaudit
24+
synchronous:
25+
method: any
26+
number: 1
2427
bootstrap:
2528
initdb:
2629
database: mydb

charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ cluster:
6161
- mymap /^(.*)@mydomain\.com$ \1
6262
shared_preload_libraries:
6363
- pgaudit
64+
syncronous:
65+
method: any
66+
number: 1
6467
initdb:
6568
database: mydb
6669
owner: dante

charts/cluster/values.schema.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,13 @@
258258
},
259259
"shared_preload_libraries": {
260260
"type": "array"
261+
},
262+
"synchronous": {
263+
"type": "object",
264+
"properties": {
265+
"method": "string",
266+
"number": "integer"
267+
}
261268
}
262269
}
263270
},

charts/cluster/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ cluster:
242242
# -- PostgreSQL configuration options (postgresql.conf)
243243
parameters: {}
244244
# max_connections: 300
245+
# -- Quorum-based Synchronous Replication
246+
synchronous: # {}
247+
# method: any
248+
# number: 1
245249
# -- PostgreSQL Host Based Authentication rules (lines to be appended to the pg_hba.conf file)
246250
pg_hba: []
247251
# - host all all 10.244.0.0/16 md5

0 commit comments

Comments
 (0)