-
Notifications
You must be signed in to change notification settings - Fork 1
/
pg2.yaml
40 lines (35 loc) · 931 Bytes
/
pg2.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: pg2
spec:
imageName: ghcr.io/cloudnative-pg/postgresql:16
enableSuperuserAccess: false
instances: 1
storage:
size: 1Gi
bootstrap:
initdb:
dataChecksums: true
walSegmentSize: 32
import:
schemaOnly: true
type: microservice
databases:
- app
source:
externalCluster: pg1
postImportApplicationSQL:
- CREATE SUBSCRIPTION migrate CONNECTION 'host=pg1-rw user=logical_repuser dbname=app sslmode=require password=Thisisatest01#' PUBLICATION migrate
externalClusters:
- name: pg1
connectionParameters:
# Use the correct IP or host name for the source database
host: pg1-rw
user: logical_repuser
dbname: postgres
password:
name: logicalrepuser
key: password
monitoring:
enablePodMonitor: true