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

View file

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

View file

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