fix(cnpg-postgres): postgres config

This commit is contained in:
nold 2023-02-13 16:37:57 +01:00
parent 895e317a92
commit 0247bd4994
3 changed files with 69 additions and 62 deletions

View file

@ -9,26 +9,26 @@ spec:
bootstrap:
recovery:
source: gitea
source: gitea-db
backup:
barmanObjectStore:
destinationPath: "s3://gitea-db/"
endpointURL: "http://minio.minio.svc.cluster.local:9000"
s3Credentials:
accessKeyId:
name: bucket
key: accesskey
secretAccessKey:
name: bucket
key: secretkey
wal:
compression: gzip
#encryption: AES256
data:
compression: gzip
#encryption: AES256
retentionPolicy: "90d"
# backup:
# barmanObjectStore:
# destinationPath: "s3://gitea-db/"
# endpointURL: "http://minio.minio.svc.cluster.local:9000"
# s3Credentials:
# accessKeyId:
# name: bucket
# key: accesskey
# secretAccessKey:
# name: bucket
# key: secretkey
# wal:
# compression: gzip
# #encryption: AES256
# data:
# compression: gzip
# #encryption: AES256
# retentionPolicy: "90d"
resources:
requests:
@ -42,14 +42,20 @@ spec:
size: 10Gi
externalClusters:
- name: gitea
connectionParameters:
host: gitea-postgresql.gitea.svc.cluster.local
user: gitea
dbname: gitea
password:
name: postgres
key: postgresql-password
- name: gitea-db
barmanObjectStore:
destinationPath: "s3://gitea-db/"
endpointURL: "http://minio.minio.svc.cluster.local:9000"
s3Credentials:
accessKeyId:
name: bucket
key: accesskey
secretAccessKey:
name: bucket
key: secretkey
wal:
maxParallel: 8
---
apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup

View file

@ -8,13 +8,8 @@ spec:
imageName: ghcr.io/cloudnative-pg/postgresql:15
bootstrap:
initdb:
import:
type: microservice
databases:
- homeassistant
source:
externalCluster: homeassistant
recovery:
backup: homeassistant-db
backup:
barmanObjectStore:
@ -33,13 +28,19 @@ spec:
externalClusters:
- name: homeassistant
connectionParameters:
host: homeassistant-postgresql.homeassistant.svc.cluster.local
user: homeassistant
dbname: nextcloud
password:
name: hass-postgres
key: postgresql-password
barmanObjectStore:
destinationPath: "s3://homeassistant-db/"
endpointURL: "http://minio.minio.svc.cluster.local:9000"
s3Credentials:
accessKeyId:
name: bucket
key: accesskey
secretAccessKey:
name: bucket
key: secretkey
wal:
maxParallel: 8
---
apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup

View file

@ -9,26 +9,26 @@ spec:
bootstrap:
recovery:
source: clusterBackup
backup:
barmanObjectStore:
destinationPath: "s3://nextcloud-db/"
endpointURL: "http://minio.minio.svc.cluster.local:9000"
s3Credentials:
accessKeyId:
name: bucket
key: accesskey
secretAccessKey:
name: bucket
key: secretkey
wal:
compression: gzip
#encryption: AES256
data:
compression: gzip
#encryption: AES256
retentionPolicy: "90d"
source: nextcloud-db
#
# backup:
# barmanObjectStore:
# destinationPath: "s3://nextcloud-db/"
# endpointURL: "http://minio.minio.svc.cluster.local:9000"
# s3Credentials:
# accessKeyId:
# name: bucket
# key: accesskey
# secretAccessKey:
# name: bucket
# key: secretkey
# wal:
# compression: gzip
# #encryption: AES256
# data:
# compression: gzip
# #encryption: AES256
# retentionPolicy: "90d"
resources:
requests:
@ -42,7 +42,7 @@ spec:
size: 10Gi
externalClusters:
- name: clusterBackup
- name: nextcloud-db
barmanObjectStore:
destinationPath: "s3://nextcloud-db/"
endpointURL: "http://minio.minio.svc.cluster.local:9000"