Skip to content

Commit

Permalink
add synchronous config (cloudnative-pg#391)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Pfenning <[email protected]>
Signed-off-by: Itay Grudev <[email protected]>
Signed-off-by: Itay Grudev <[email protected]>
Co-authored-by: Itay Grudev <[email protected]>
Co-authored-by: Itay Grudev <[email protected]>
  • Loading branch information
3 people authored and hapeho committed Dec 18, 2024
1 parent fcc29bc commit 4af0d43
Show file tree
Hide file tree
Showing 6 changed files with 18 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 @@ -173,6 +173,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
4 changes: 4 additions & 0 deletions charts/cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ spec:
pg_ident:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.cluster.postgresql.synchronous }}
synchronous:
{{- toYaml . | nindent 6 }}
{{ end }}
{{- with .Values.cluster.postgresql.parameters }}
parameters:
{{- toYaml . | nindent 6 }}
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 @@ -62,6 +62,9 @@ cluster:
- mymap /^(.*)@mydomain\.com$ \1
shared_preload_libraries:
- pgaudit
synchronous:
method: any
number: 1
initdb:
database: mydb
owner: dante
Expand Down
3 changes: 3 additions & 0 deletions charts/cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@
},
"shared_preload_libraries": {
"type": "array"
},
"synchronous": {
"type": "object"
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions charts/cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,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 4af0d43

Please sign in to comment.