Skip to content

Commit

Permalink
feat(cluster): Add replication slots configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitriy Alekseev <[email protected]>
  • Loading branch information
dragoangel committed Aug 26, 2024
1 parent f0ea226 commit 778ac48
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ name: cluster
description: Deploys and manages a CloudNativePG cluster and its associated resources.
icon: https://raw.githubusercontent.com/cloudnative-pg/artwork/main/cloudnativepg-logo.svg
type: application
version: 0.0.9
version: 0.0.10
sources:
- https://github.com/cloudnative-pg/charts
keywords:
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 @@ -51,6 +51,10 @@ spec:
superuserSecret:
name: {{ . }}
{{ end }}
{{- with .Values.cluster.replicationSlots }}
replicationSlots:
{{- toYaml . | nindent 4 }}
{{ end }}
postgresql:
shared_preload_libraries:
{{- if eq .Values.type "timescaledb" }}
Expand Down
19 changes: 19 additions & 0 deletions charts/cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,25 @@
"superuserSecret": {
"type": "string"
},
"replicationSlots": {
"type": "object",
"properties": {
"highAvailability": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"slotPrefix": {
"type": "string"
},
"updateInterval": {
"type": "string"
}
}
}
}
}
"walStorage": {
"type": "object",
"properties": {
Expand Down
9 changes: 9 additions & 0 deletions charts/cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,15 @@ cluster:
enableSuperuserAccess: true
superuserSecret: ""

# -- This feature automatically manages physical replication slots for each hot standby replica in
# the High Availability cluster, both in the primary and the standby.
# See: https://cloudnative-pg.io/documentation/current/replication/#replication-slots-for-high-availability
replicationSlots:
highAvailability:
enabled: true
slotPrefix: _cnpg_
updateInterval: "30"

# -- This feature enables declarative management of existing roles, as well as the creation of new roles if they are not
# already present in the database.
# See: https://cloudnative-pg.io/documentation/current/declarative_role_management/
Expand Down

0 comments on commit 778ac48

Please sign in to comment.