From d67da99513d74c9aada4eb92ad0102ed6ef4d7d1 Mon Sep 17 00:00:00 2001 From: TheDatabaseMe Date: Sat, 7 Oct 2023 22:06:52 +0200 Subject: [PATCH] added standby manifests --- .../demo-standby-cluster-source.yaml | 60 +++++++++++++ .../demo-standby-cluster-target.yaml | 86 +++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100644 kubernetes/zalando-postgres-operator/manifests/demo-standby-cluster-source.yaml create mode 100644 kubernetes/zalando-postgres-operator/manifests/demo-standby-cluster-target.yaml diff --git a/kubernetes/zalando-postgres-operator/manifests/demo-standby-cluster-source.yaml b/kubernetes/zalando-postgres-operator/manifests/demo-standby-cluster-source.yaml new file mode 100644 index 0000000..67d28cb --- /dev/null +++ b/kubernetes/zalando-postgres-operator/manifests/demo-standby-cluster-source.yaml @@ -0,0 +1,60 @@ +apiVersion: v1 +data: + password: RzZ6RjQ5bWUxZnZnV0NoQ1dtaTY0aFpWczJSWEZiU1FhSWdNN3ROSWl1Uk9mMEk4aldoNmpKRmxQUThVaTFpMA== + username: ZGVtb3VzZXI= +kind: Secret +metadata: + labels: + application: spilo + cluster-name: postgres-demo-standby-cluster-source + team: postgres + name: demouser.postgres-demo-standby-cluster-source.credentials.postgresql.acid.zalan.do + namespace: postgres +type: Opaque +--- +apiVersion: v1 +data: + password: MDBva3lDU2x1YkZXdkQwdWgxRlJSRzU5OEg3bU1yWE11djRHc0tPTHQyb2ZOMlZ5UDNkd1pxcU9WOEk5UEtOaA== + username: cG9zdGdyZXM= +kind: Secret +metadata: + labels: + application: spilo + cluster-name: postgres-demo-standby-cluster-source + team: postgres + name: postgres.postgres-demo-standby-cluster-source.credentials.postgresql.acid.zalan.do + namespace: postgres +type: Opaque +--- +apiVersion: v1 +data: + password: ZGJkYlozY2diZ3pGM2lhVlBaeGhKU0d4Vm1yUVlId2ZxYXV3cmx5eUNZdnJ5dG5DeEprbVdtUkU3R0F5eWNZaw== + username: c3RhbmRieQ== +kind: Secret +metadata: + labels: + application: spilo + cluster-name: postgres-demo-standby-cluster-source + team: postgres + name: standby.postgres-demo-standby-cluster-source.credentials.postgresql.acid.zalan.do + namespace: postgres +type: Opaque +--- +apiVersion: "acid.zalan.do/v1" +kind: postgresql +metadata: + name: postgres-demo-standby-cluster-source + namespace: postgres +spec: + teamId: "postgres" + volume: + size: 2Gi + numberOfInstances: 2 + users: + demouser: # database owner + - superuser + - createdb + databases: + demo: demouser # dbname: owner + postgresql: + version: "14" \ No newline at end of file diff --git a/kubernetes/zalando-postgres-operator/manifests/demo-standby-cluster-target.yaml b/kubernetes/zalando-postgres-operator/manifests/demo-standby-cluster-target.yaml new file mode 100644 index 0000000..25e68e5 --- /dev/null +++ b/kubernetes/zalando-postgres-operator/manifests/demo-standby-cluster-target.yaml @@ -0,0 +1,86 @@ +apiVersion: v1 +data: + password: RzZ6RjQ5bWUxZnZnV0NoQ1dtaTY0aFpWczJSWEZiU1FhSWdNN3ROSWl1Uk9mMEk4aldoNmpKRmxQUThVaTFpMA== + username: ZGVtb3VzZXI= +kind: Secret +metadata: + labels: + application: spilo + cluster-name: postgres-demo-standby-cluster-target + team: postgres + name: demouser.postgres-demo-standby-cluster-target.credentials.postgresql.acid.zalan.do + namespace: postgres +type: Opaque +--- +apiVersion: v1 +data: + password: MDBva3lDU2x1YkZXdkQwdWgxRlJSRzU5OEg3bU1yWE11djRHc0tPTHQyb2ZOMlZ5UDNkd1pxcU9WOEk5UEtOaA== + username: cG9zdGdyZXM= +kind: Secret +metadata: + labels: + application: spilo + cluster-name: postgres-demo-standby-cluster-target + team: postgres + name: postgres.postgres-demo-standby-cluster-target.credentials.postgresql.acid.zalan.do + namespace: postgres +type: Opaque +--- +apiVersion: v1 +data: + password: ZGJkYlozY2diZ3pGM2lhVlBaeGhKU0d4Vm1yUVlId2ZxYXV3cmx5eUNZdnJ5dG5DeEprbVdtUkU3R0F5eWNZaw== + username: c3RhbmRieQ== +kind: Secret +metadata: + labels: + application: spilo + cluster-name: postgres-demo-standby-cluster-target + team: postgres + name: standby.postgres-demo-standby-cluster-target.credentials.postgresql.acid.zalan.do + namespace: postgres +type: Opaque +--- +apiVersion: "acid.zalan.do/v1" +kind: postgresql +metadata: + name: postgres-demo-standby-cluster-target + namespace: postgres +spec: + teamId: "postgres" + volume: + size: 2Gi + numberOfInstances: 2 + users: + demouser: # database owner + - superuser + - createdb + databases: + demo: demouser # dbname: owner + standby: +# standby_host: "postgres-demo-standby-cluster-source.postgres" + s3_wal_path: "s3://postgresql/spilo/postgres-demo-standby-cluster-source/wal/14" + env: + - name: STANDBY_AWS_ACCESS_KEY_ID + value: postgresql + - name: STANDBY_WITH_WALE + value: "true" + - name: STANDBY_USE_WALG_BACKUP + value: "true" + - name: STANDBY_USE_WALG_RESTORE + value: "true" + - name: STANDBY_AWS_SECRET_ACCESS_KEY + value: Supersecret + - name: STANDBY_AWS_ENDPOINT + value: "http://minio.home.lab:9000" + - name: STANDBY_AWS_REGION + value: de01 + - name: STANDBY_WAL_BUCKET_SCOPE_PREFIX + value: "" + - name: STANDBY_WAL_S3_BUCKET + value: postgresql + - name: STANDBY_AWS_S3_FORCE_PATH_STYLE + value: "true" + - name: STANDBY_WALE_ENV_DIR + value: "/run/etc/wal-e.d/env-standby" + postgresql: + version: "14" \ No newline at end of file