apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
  name: cluster-replica
spec:
  instances: 3
  bootstrap:
    pg_basebackup:
      source: source
  replica:
    enabled: true
    source: source
  externalClusters:
  - name: source
    connectionParameters:
      host: cluster-example-rw.default.svc
      user: streaming_replica
      sslmode: verify-full
      dbname: postgres
    sslKey:
      name: cluster-example-replication
      key: tls.key
    sslCert:
      name: cluster-example-replication
      key: tls.crt
    sslRootCert:
      name: cluster-example-ca
      key: ca.crt
    plugin:
      name: barman-cloud.cloudnative-pg.io
      parameters:
        barmanObjectName: minio-store
        serverName: cluster-example
  storage:
    size: 1Gi

