Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ⚡ Add postgresWalMaxSlotKeepSize parameter #357

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions roles/gitlab/templates/pg-cluster-gitlab.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
postgresql:
parameters:
max_worker_processes: "60"
{% if dsc.gitlab.postgresWalMaxSlotKeepSize is defined %}
max_slot_wal_keep_size: {{ dsc.gitlab.postgresWalMaxSlotKeepSize }}
{% endif %}
{% if dsc.gitlab.cnpg.mode == "primary" %}
pg_hba:
# To access through TCP/IP you will need to get username
Expand Down
3 changes: 3 additions & 0 deletions roles/harbor/templates/pg-cluster-harbor.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
postgresql:
parameters:
max_worker_processes: "60"
{% if dsc.harbor.postgresWalMaxSlotKeepSize is defined %}
max_slot_wal_keep_size: {{ dsc.harbor.postgresWalMaxSlotKeepSize }}
{% endif %}
{% if dsc.harbor.cnpg.mode == "primary" %}
pg_hba:
# To access through TCP/IP you will need to get username
Expand Down
3 changes: 3 additions & 0 deletions roles/keycloak/templates/pg-cluster-keycloak.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
postgresql:
parameters:
max_worker_processes: "60"
{% if dsc.keycloak.postgresWalMaxSlotKeepSize is defined %}
max_slot_wal_keep_size: {{ dsc.keycloak.postgresWalMaxSlotKeepSize }}
{% endif %}
{% if dsc.keycloak.cnpg.mode == "primary" %}
pg_hba:
# To access through TCP/IP you will need to get username
Expand Down
40 changes: 40 additions & 0 deletions roles/socle-config/files/crd-conf-dso.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ spec:
description: Size for postgres data pvc.
type: string
default: 10Gi
postgresWalMaxSlotKeepSize:
description: |
Maximum size of WAL files that replication slots are allowed to retain in the pg_wal directory at checkpoint time.
Default is -1, meaning that replication slots may retain an unlimited amount of WAL files.
You can for instance set it to "9GB".
See: https://cloudnative-pg.io/documentation/current/replication/#capping-the-wal-size-retained-for-replication-slots
Refer to postgresql.conf for memory units.
type: string
postgresWalPvcSize:
description: Size for postgres wal pvc (if value is not set then WAL files are stored within the data PVC).
type: string
Expand Down Expand Up @@ -301,6 +309,14 @@ spec:
description: Size for postgres data pvc.
type: string
default: 10Gi
postgresWalMaxSlotKeepSize:
description: |
Maximum size of WAL files that replication slots are allowed to retain in the pg_wal directory at checkpoint time.
Default is -1, meaning that replication slots may retain an unlimited amount of WAL files.
You can for instance set it to "9GB".
See: https://cloudnative-pg.io/documentation/current/replication/#capping-the-wal-size-retained-for-replication-slots
Refer to postgresql.conf for memory units.
type: string
postgresWalPvcSize:
description: Size for postgres wal pvc (if value is not set then WAL files are stored within the data PVC).
type: string
Expand Down Expand Up @@ -763,6 +779,14 @@ spec:
description: Size for postgres data pvc.
type: string
default: 10Gi
postgresWalMaxSlotKeepSize:
description: |
Maximum size of WAL files that replication slots are allowed to retain in the pg_wal directory at checkpoint time.
Default is -1, meaning that replication slots may retain an unlimited amount of WAL files.
You can for instance set it to "9GB".
See: https://cloudnative-pg.io/documentation/current/replication/#capping-the-wal-size-retained-for-replication-slots
Refer to postgresql.conf for memory units.
type: string
postgresWalPvcSize:
description: Size for postgres wal pvc (if value is not set then WAL files are stored within the data PVC).
type: string
Expand Down Expand Up @@ -899,6 +923,14 @@ spec:
description: Size for postgres data pvc.
type: string
default: 10Gi
postgresWalMaxSlotKeepSize:
description: |
Maximum size of WAL files that replication slots are allowed to retain in the pg_wal directory at checkpoint time.
Default is -1, meaning that replication slots may retain an unlimited amount of WAL files.
You can for instance set it to "9GB".
See: https://cloudnative-pg.io/documentation/current/replication/#capping-the-wal-size-retained-for-replication-slots
Refer to postgresql.conf for memory units.
type: string
postgresWalPvcSize:
description: Size for postgres wal pvc (if value is not set then WAL files are stored within the data PVC).
type: string
Expand Down Expand Up @@ -1041,6 +1073,14 @@ spec:
description: Size for postgres data pvc.
type: string
default: 10Gi
postgresWalMaxSlotKeepSize:
description: |
Maximum size of WAL files that replication slots are allowed to retain in the pg_wal directory at checkpoint time.
Default is -1, meaning that replication slots may retain an unlimited amount of WAL files.
You can for instance set it to "9GB".
See: https://cloudnative-pg.io/documentation/current/replication/#capping-the-wal-size-retained-for-replication-slots
Refer to postgresql.conf for memory units.
type: string
postgresWalPvcSize:
description: Size for postgres wal pvc (if value is not set then WAL files are stored within the data PVC).
type: string
Expand Down
3 changes: 3 additions & 0 deletions roles/sonarqube/templates/pg-cluster-sonar.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
postgresql:
parameters:
max_worker_processes: "60"
{% if dsc.sonarqube.postgresWalMaxSlotKeepSize is defined %}
max_slot_wal_keep_size: {{ dsc.sonarqube.postgresWalMaxSlotKeepSize }}
{% endif %}
{% if dsc.sonarqube.cnpg.mode == "primary" %}
pg_hba:
# To access through TCP/IP you will need to get username
Expand Down