2022-12-13 20:35:35 +00:00
|
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
|
|
kind: Cluster
|
|
|
|
metadata:
|
|
|
|
name: gitea-db
|
|
|
|
namespace: gitea
|
|
|
|
spec:
|
|
|
|
instances: 1
|
|
|
|
imageName: ghcr.io/cloudnative-pg/postgresql:15
|
|
|
|
|
|
|
|
bootstrap:
|
|
|
|
initdb:
|
|
|
|
import:
|
|
|
|
type: microservice
|
|
|
|
databases:
|
|
|
|
- gitea
|
|
|
|
source:
|
|
|
|
externalCluster: gitea
|
|
|
|
|
|
|
|
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:
|
|
|
|
memory: "64Mi"
|
|
|
|
cpu: "50m"
|
|
|
|
limits:
|
|
|
|
memory: "1Gi"
|
|
|
|
cpu: "1"
|
|
|
|
|
|
|
|
storage:
|
|
|
|
size: 10Gi
|
|
|
|
|
|
|
|
externalClusters:
|
|
|
|
- name: gitea
|
|
|
|
connectionParameters:
|
|
|
|
host: gitea-postgresql.gitea.svc.cluster.local
|
|
|
|
user: gitea
|
|
|
|
dbname: gitea
|
|
|
|
password:
|
|
|
|
name: postgres
|
|
|
|
key: postgresql-password
|
2022-12-14 09:15:38 +00:00
|
|
|
---
|
|
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
|
|
kind: ScheduledBackup
|
|
|
|
metadata:
|
|
|
|
name: gitea-db-backup
|
|
|
|
namespace: gitea
|
|
|
|
spec:
|
2022-12-15 17:08:14 +00:00
|
|
|
schedule: "0 0 * * * *"
|
2022-12-14 09:15:38 +00:00
|
|
|
backupOwnerReference: self
|
|
|
|
cluster:
|
|
|
|
name: gitea-db
|