Skip to content

Commit d7393cd

Browse files
authored
Merge branch 'main' into updateMinorReleaseOct24_pgbackrest_gcs
2 parents 3ef953c + eb19a9c commit d7393cd

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# pgbackrest with GCS
2+
3+
## Creating the key.json file
4+
5+
The key.json file should be created on an appropriate GCP IAM service account with at least the minimum permissions for
6+
GCS to read/write to your bucket. Once the keyfile is downloaded, it should be created as a secret within kubernetes using
7+
either the appropriate ci/cd pipelines (leveraging an engine like Vault), or via:
8+
9+
```
10+
kubectl create secret generic gcs-credentials --from-file=/path/to/key.json
11+
```
12+
13+
## Method 1: operator configuration
14+
15+
The operator needs the following configuration enabled to mount the gcs-credentials secret in all postgres containers:
16+
17+
```
18+
configuration:
19+
aws_or_gcp:
20+
additional_secret_mount: gcs-credentials
21+
additional_secret_mount_path: /var/secrets/google
22+
gcp_credentials: /var/secrets/google/key.json
23+
```
24+
25+
## Method 2: per-cluster configuration
26+
27+
Alternatively you could utilize additionalVolumes in postgres.yaml to mount cluster-specific secrets in the postgresql cluster,
28+
but if you change the name or the path that the keyfile is mounted to, you need to update spec.backup.pgbackrest.global.repo1-gcs-key
29+
in postgres.yaml to match.

cluster-tutorials/restore/postgres.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: postgresql
33
metadata:
44
name: cluster-1
55
spec:
6-
dockerImage: 'docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.3-1'
6+
dockerImage: 'docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.4-1'
77
numberOfInstances: 1
88
postgresql:
99
version: '16'

0 commit comments

Comments
 (0)