added DB-system
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
---
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: postgresql
|
||||
namespace: database-system
|
||||
spec:
|
||||
instances: 1 # Start with 1, scale to 3 later for HA
|
||||
|
||||
# PostgreSQL version
|
||||
imageName: ghcr.io/cloudnative-pg/postgresql:17.2
|
||||
|
||||
# Bootstrap
|
||||
bootstrap:
|
||||
initdb:
|
||||
database: postgres
|
||||
owner: postgres
|
||||
secret:
|
||||
name: postgres-superuser
|
||||
|
||||
# Storage
|
||||
storage:
|
||||
storageClass: longhorn
|
||||
size: 50Gi
|
||||
|
||||
# Resources
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "500m"
|
||||
limits:
|
||||
memory: "4Gi"
|
||||
cpu: "2000m"
|
||||
|
||||
# Monitoring
|
||||
monitoring:
|
||||
enablePodMonitor: true
|
||||
|
||||
# Backup configuration (optional but recommended)
|
||||
#backup:
|
||||
# barmanObjectStore:
|
||||
# destinationPath: s3://your-bucket/postgresql-backups/
|
||||
# Configure your S3-compatible storage here
|
||||
# Or skip backups for now and add later
|
||||
|
||||
# PostgreSQL configuration
|
||||
postgresql:
|
||||
parameters:
|
||||
max_connections: "200"
|
||||
shared_buffers: "256MB"
|
||||
effective_cache_size: "1GB"
|
||||
maintenance_work_mem: "64MB"
|
||||
checkpoint_completion_target: "0.9"
|
||||
wal_buffers: "16MB"
|
||||
default_statistics_target: "100"
|
||||
random_page_cost: "1.1"
|
||||
effective_io_concurrency: "200"
|
||||
work_mem: "2621kB"
|
||||
min_wal_size: "1GB"
|
||||
max_wal_size: "4GB"
|
||||
Reference in New Issue
Block a user