Files
cozystack/packages/apps/postgres
Andrei Kvapil 20c72e70c0 [build] Cross-arch builds: components (#932)
Components with existing dockerfiles will be updated in this PR.

Part of #519

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added support for multi-architecture and cross-platform Docker image
builds across various components, enabling builds for different
operating systems and CPU architectures.

- **Chores**
- Updated Docker build commands in multiple Makefiles to use
configurable builder and platform variables, improving build
flexibility.
- Standardized Dockerfile build arguments and environment variables for
cross-compilation.
- Improved package installation commands for quieter and more minimal
installs in Dockerfiles.
- Changed the default bucket name configuration to "cozystack" in system
bucket settings.
- Updated some maintenance targets and manual update reminders in
Makefiles.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

(cherry picked from commit 4f78b133c2)
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-05-20 19:12:37 +03:00
..
2025-04-25 12:37:42 +00:00
2024-08-12 14:47:11 +02:00
2025-05-20 19:06:51 +03:00
2024-07-16 17:31:52 +02:00
2025-05-20 19:06:51 +03:00
2025-03-13 17:03:00 +03:00
2025-03-13 17:03:00 +03:00
2025-03-13 17:03:00 +03:00

Managed PostgreSQL Service

PostgreSQL is currently the leading choice among relational databases, known for its robust features and performance. Our Managed PostgreSQL Service takes advantage of platform-side implementation to provide a self-healing replicated cluster. This cluster is efficiently managed using the highly acclaimed CloudNativePG operator, which has gained popularity within the community.

Deployment Details

This managed service is controlled by the CloudNativePG operator, ensuring efficient management and seamless operation.

HowTos

How to switch master/slave replica

See:

How to restore backup

find snapshot:

restic -r s3:s3.example.org/postgres-backups/database_name snapshots

restore:

restic -r s3:s3.example.org/postgres-backups/database_name restore latest --target /tmp/

more details:

Parameters

Common parameters

Name Description Value
external Enable external access from outside the cluster false
size Persistent Volume size 10Gi
replicas Number of Postgres replicas 2
storageClass StorageClass used to store the data ""
postgresql.parameters.max_connections Determines the maximum number of concurrent connections to the database server. The default is typically 100 connections 100
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

Name Description Value
users Users configuration {}
databases Databases configuration {}

Backup parameters

Name Description Value
backup.enabled Enable pereiodic backups false
backup.s3Region The AWS S3 region where backups are stored us-east-1
backup.s3Bucket The S3 bucket used for storing backups s3.example.org/postgres-backups
backup.schedule Cron schedule for automated backups 0 2 * * *
backup.cleanupStrategy The strategy for cleaning up old backups --keep-last=3 --keep-daily=3 --keep-within-weekly=1m
backup.s3AccessKey The access key for S3, used for authentication oobaiRus9pah8PhohL1ThaeTa4UVa7gu
backup.s3SecretKey The secret key for S3, used for authentication ju3eum4dekeich9ahM1te8waeGai0oog
backup.resticPassword The password for Restic backup encryption ChaXoveekoh6eigh4siesheeda2quai0
resources Resources {}
resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). nano