Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: kubedb.com/v1
kind: Postgres
metadata:
name: pg-mig
namespace: demo
spec:
clientAuthMode: md5
standbyMode: Hot
replicas: 1
storage:
accessModes: [ReadWriteOnce]
resources:
requests:
storage: 10Gi # must hold the full source database plus WAL
storageType: Durable
deletionPolicy: Halt
version: "17.4" # must match the source's MAJOR version
23 changes: 23 additions & 0 deletions docs/guides/postgres/remote-replica/migration-yamls/pg-mig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: kubedb.com/v1
kind: Postgres
metadata:
name: pg-mig
namespace: demo
spec:
remoteReplica:
sourceRef:
name: source-pg # the AppBinding above, in THIS cluster
namespace: demo
authSecret:
name: source-pg-auth # during the warm phase: the migration user's credentials
clientAuthMode: md5
standbyMode: Hot
replicas: 1
storage:
accessModes: [ReadWriteOnce]
resources:
requests:
storage: 10Gi # must hold the full source database plus WAL
storageType: Durable
deletionPolicy: Halt
version: "17.4" # must match the source's MAJOR version
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Hand-crafted AppBinding for a source PostgreSQL that is NOT managed by KubeDB.
# Edit: service.name (source address), secret credentials, and sslmode.
apiVersion: v1
kind: Secret
metadata:
name: source-pg-auth
namespace: demo
stringData:
username: migrator # the replication user the source DBA created for you
password: "<migrator-password>"
type: kubernetes.io/basic-auth
---
apiVersion: appcatalog.appscode.com/v1alpha1
kind: AppBinding
metadata:
name: source-pg
namespace: demo
labels:
app.kubernetes.io/name: postgreses.kubedb.com
spec:
clientConfig:
service:
name: 10.2.0.30 # source address reachable from THIS cluster
path: /
port: 5432 # honored: set to the source's actual port
query: sslmode=disable # or verify-ca with a tlsSecret carrying the SOURCE's CA
scheme: postgresql
secret:
apiGroup: ""
kind: Secret
name: source-pg-auth
type: kubedb.com/postgres
version: "17.4"
Loading
Loading