File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 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.
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ kind: postgresql
33metadata :
44 name : cluster-1
55spec :
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'
You can’t perform that action at this time.
0 commit comments