add(hass|nextcloud): postgresql

This commit is contained in:
nold 2022-12-13 21:18:42 +01:00
parent 08362fca3c
commit 764b281108
2 changed files with 99 additions and 0 deletions

View file

@ -0,0 +1,42 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: homeassistant
namespace: homeassistant
spec:
instances: 1
imageName: ghcr.io/cloudnative-pg/postgresql:15
bootstrap:
initdb:
import:
type: microservice
databases:
- homeassistant
source:
externalCluster: homeassistant
backup:
barmanObjectStore:
destinationPath: "s3://homeassistant-db/"
endpointURL: "http://minio.minio.svc.cluster.local:9000"
s3Credentials:
accessKeyId:
name: bucket
key: accesskey
secretAccessKey:
name: bucket
key: secretkey
storage:
size: 10Gi
externalClusters:
- name: homeassistant
connectionParameters:
host: homeassistant-postgresql.homeassistant.svc.cluster.local
user: homeassistant
dbname: nextcloud
password:
name: hass-postgres
key: postgresql-password

View file

@ -0,0 +1,57 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: nextcloud-db
namespace: nextcloud
spec:
instances: 1
imageName: ghcr.io/cloudnative-pg/postgresql:15
bootstrap:
initdb:
import:
type: microservice
databases:
- nextcloud
source:
externalCluster: nextcloud
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:
memory: "64Mi"
cpu: "50m"
limits:
memory: "1Gi"
cpu: "1"
storage:
size: 10Gi
externalClusters:
- name: nextcloud
connectionParameters:
host: nextcloud-postgresql.nextcloud.svc.cluster.local
user: nextcloud
dbname: nextcloud
password:
name: nextcloud-postgres
key: postgresql-password