88 lines
1.8 KiB
YAML
88 lines
1.8 KiB
YAML
apiVersion: postgresql.cnpg.io/v1
|
|
kind: Cluster
|
|
metadata:
|
|
name: temporal-db
|
|
namespace: temporal
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "-2"
|
|
spec:
|
|
instances: 2
|
|
imageName: ghcr.io/cloudnative-pg/postgresql:18.1-system-trixie
|
|
bootstrap:
|
|
initdb:
|
|
database: temporal
|
|
owner: temporal
|
|
# headroom for ~240 server connections (30/pod x 8 pods) plus CNPG's own
|
|
postgresql:
|
|
parameters:
|
|
max_connections: "300"
|
|
resources:
|
|
requests:
|
|
cpu: 500m
|
|
memory: 1Gi
|
|
limits:
|
|
cpu: "2"
|
|
memory: 2Gi
|
|
storage:
|
|
resizeInUseVolumes: true
|
|
size: 20Gi
|
|
---
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
kind: Database
|
|
metadata:
|
|
name: temporal-visibility
|
|
namespace: temporal
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "-2"
|
|
spec:
|
|
name: temporal_visibility
|
|
owner: temporal
|
|
cluster:
|
|
name: temporal-db
|
|
---
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: PodMonitor
|
|
metadata:
|
|
name: temporal-db-monitor
|
|
namespace: temporal
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
cnpg.io/cluster: temporal-db
|
|
podMetricsEndpoints:
|
|
- port: metrics
|
|
---
|
|
apiVersion: barmancloud.cnpg.io/v1
|
|
kind: ObjectStore
|
|
metadata:
|
|
name: tos-store
|
|
namespace: temporal
|
|
spec:
|
|
retentionPolicy: "7d"
|
|
configuration:
|
|
destinationPath: s3://cnpg/temporal-db
|
|
endpointURL: http://10.255.241.30:30080
|
|
s3Credentials:
|
|
accessKeyId:
|
|
name: cnpg-s3
|
|
key: access_key
|
|
secretAccessKey:
|
|
name: cnpg-s3
|
|
key: access_secret
|
|
wal:
|
|
compression: snappy
|
|
---
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
kind: ScheduledBackup
|
|
metadata:
|
|
name: temporal-db
|
|
namespace: temporal
|
|
spec:
|
|
schedule: "0 0 1 * * *"
|
|
backupOwnerReference: self
|
|
cluster:
|
|
name: temporal-db
|
|
method: plugin
|
|
pluginConfiguration:
|
|
name: barman-cloud.cloudnative-pg.io
|