diff --git a/packages/apps/postgres/Chart.yaml b/packages/apps/postgres/Chart.yaml index 89dee73f..eb9ab8cc 100644 --- a/packages/apps/postgres/Chart.yaml +++ b/packages/apps/postgres/Chart.yaml @@ -16,7 +16,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.1 +version: 0.3.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/packages/apps/postgres/README.md b/packages/apps/postgres/README.md index 5bdf290f..6fbfc582 100644 --- a/packages/apps/postgres/README.md +++ b/packages/apps/postgres/README.md @@ -35,11 +35,13 @@ more details: ### Common parameters -| Name | Description | Value | -| ---------- | ----------------------------------------------- | ------- | -| `external` | Enable external access from outside the cluster | `false` | -| `size` | Persistent Volume size | `10Gi` | -| `replicas` | Number of MariaDB replicas | `2` | +| Name | Description | Value | +| ------------------------ | ----------------------------------------------------------------------------------------------------------------------- | ------- | +| `external` | Enable external access from outside the cluster | `false` | +| `size` | Persistent Volume size | `10Gi` | +| `replicas` | Number of Postgres replicas | `2` | +| `quorum.minSyncReplicas` | Minimum number of synchronous replicas that must acknowledge a transaction before it is considered committed. | `0` | +| `quorum.maxSyncReplicas` | Maximum number of synchronous replicas that can acknowledge a transaction (must be lower than the number of instances). | `0` | ### Configuration parameters diff --git a/packages/apps/postgres/templates/db.yaml b/packages/apps/postgres/templates/db.yaml index 7c7d5b9e..7c1483a1 100644 --- a/packages/apps/postgres/templates/db.yaml +++ b/packages/apps/postgres/templates/db.yaml @@ -11,6 +11,9 @@ spec: parameters: max_wal_senders: "30" + minSyncReplicas: {{ .Values.quorum.minSyncReplicas }} + maxSyncReplicas: {{ .Values.quorum.maxSyncReplicas }} + monitoring: enablePodMonitor: true diff --git a/packages/apps/postgres/values.schema.json b/packages/apps/postgres/values.schema.json index 11e09d44..51b81336 100644 --- a/packages/apps/postgres/values.schema.json +++ b/packages/apps/postgres/values.schema.json @@ -14,9 +14,24 @@ }, "replicas": { "type": "number", - "description": "Number of MariaDB replicas", + "description": "Number of Postgres replicas", "default": 2 }, + "quorum": { + "type": "object", + "properties": { + "minSyncReplicas": { + "type": "number", + "description": "Minimum number of synchronous replicas that must acknowledge a transaction before it is considered committed.", + "default": 0 + }, + "maxSyncReplicas": { + "type": "number", + "description": "Maximum number of synchronous replicas that can acknowledge a transaction (must be lower than the number of instances).", + "default": 0 + } + } + }, "databases": { "type": "object", "description": "Databases configuration", diff --git a/packages/apps/postgres/values.yaml b/packages/apps/postgres/values.yaml index 2b7b49c1..0fdd8c19 100644 --- a/packages/apps/postgres/values.yaml +++ b/packages/apps/postgres/values.yaml @@ -2,12 +2,19 @@ ## @param external Enable external access from outside the cluster ## @param size Persistent Volume size -## @param replicas Number of MariaDB replicas +## @param replicas Number of Postgres replicas ## external: false size: 10Gi replicas: 2 +## Configuration for the quorum-based synchronous replication +## @param quorum.minSyncReplicas Minimum number of synchronous replicas that must acknowledge a transaction before it is considered committed. +## @param quorum.maxSyncReplicas Maximum number of synchronous replicas that can acknowledge a transaction (must be lower than the number of instances). +quorum: + minSyncReplicas: 0 + maxSyncReplicas: 0 + ## @section Configuration parameters ## @param users [object] Users configuration diff --git a/packages/apps/versions_map b/packages/apps/versions_map index 712c3014..5d5d46b8 100644 --- a/packages/apps/versions_map +++ b/packages/apps/versions_map @@ -14,7 +14,8 @@ mysql 0.2.0 8b975ff0 mysql 0.3.0 HEAD postgres 0.1.0 f642698 postgres 0.2.0 7cd7de73 -postgres 0.2.1 HEAD +postgres 0.2.1 4a97e297 +postgres 0.3.0 HEAD rabbitmq 0.1.0 f642698 rabbitmq 0.2.0 HEAD redis 0.1.1 f642698