From 0247bd4994b807d725453aa57e5e565295f38cce Mon Sep 17 00:00:00 2001 From: nold Date: Mon, 13 Feb 2023 16:37:57 +0100 Subject: [PATCH] fix(cnpg-postgres): postgres config --- projects/gitea/manifests/postgre.yaml | 60 ++++++++++--------- projects/homeassistant/manifests/postgre.yaml | 29 ++++----- projects/nextcloud/manifests/postgre.yaml | 42 ++++++------- 3 files changed, 69 insertions(+), 62 deletions(-) diff --git a/projects/gitea/manifests/postgre.yaml b/projects/gitea/manifests/postgre.yaml index 381b4707..d0198c1e 100644 --- a/projects/gitea/manifests/postgre.yaml +++ b/projects/gitea/manifests/postgre.yaml @@ -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 diff --git a/projects/homeassistant/manifests/postgre.yaml b/projects/homeassistant/manifests/postgre.yaml index d8a1004c..fad7a6ca 100644 --- a/projects/homeassistant/manifests/postgre.yaml +++ b/projects/homeassistant/manifests/postgre.yaml @@ -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 diff --git a/projects/nextcloud/manifests/postgre.yaml b/projects/nextcloud/manifests/postgre.yaml index 373b4032..78a49e3d 100644 --- a/projects/nextcloud/manifests/postgre.yaml +++ b/projects/nextcloud/manifests/postgre.yaml @@ -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"