Skip to content

Commit

Permalink
add synchronous config
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Pfenning <[email protected]>
  • Loading branch information
ppfenning92 committed Sep 17, 2024
1 parent 3680ee5 commit 372d354
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentat
| cluster.postgresGID | int | `-1` | The GID of the postgres user inside the image, defaults to 26 |
| cluster.postgresUID | int | `-1` | The UID of the postgres user inside the image, defaults to 26 |
| cluster.postgresql.parameters | object | `{}` | PostgreSQL configuration options (postgresql.conf) |
| cluster.postgresql.synchronous | object | `{}` | SynchronousReplicaConfiguration. See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-SynchronousReplicaConfiguration |
| cluster.postgresql.pg_hba | list | `[]` | PostgreSQL Host Based Authentication rules (lines to be appended to the pg_hba.conf file) |
| cluster.postgresql.pg_ident | list | `[]` | PostgreSQL User Name Maps rules (lines to be appended to the pg_ident.conf file) |
| cluster.postgresql.shared_preload_libraries | list | `[]` | Lists of shared preload libraries to add to the default ones |
Expand Down
2 changes: 2 additions & 0 deletions charts/cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ spec:
{{- toYaml .pg_hba | nindent 6 }}
pg_ident:
{{- toYaml .pg_ident | nindent 6 }}
synchronous:
{{- toYaml .synchronous | nindent 6 }}
{{ end }}

managed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ spec:
- mymap /^(.*)@mydomain\.com$ \1
shared_preload_libraries:
- pgaudit
synchronous:
method: any
number: 1
bootstrap:
initdb:
database: mydb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ cluster:
- mymap /^(.*)@mydomain\.com$ \1
shared_preload_libraries:
- pgaudit
syncronous:
method: any
number: 1
initdb:
database: mydb
owner: dante
Expand Down
7 changes: 7 additions & 0 deletions charts/cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,13 @@
},
"shared_preload_libraries": {
"type": "array"
},
"synchronous": {
"type": "object",
"properties": {
"method": "string",
"number": "integer"
}
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions charts/cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ cluster:
# -- PostgreSQL configuration options (postgresql.conf)
parameters: {}
# max_connections: 300
# -- Quorum-based Synchronous Replication
synchronous: # {}
# method: any
# number: 1
# -- PostgreSQL Host Based Authentication rules (lines to be appended to the pg_hba.conf file)
pg_hba: []
# - host all all 10.244.0.0/16 md5
Expand Down

0 comments on commit 372d354

Please sign in to comment.