Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to add backups to existing cluster, /run/etc/wal-e.d/env is missing #2618

Open
verdverm opened this issue Apr 23, 2024 · 3 comments
Open

Comments

@verdverm
Copy link

verdverm commented Apr 23, 2024

Please, answer some short questions which should help us to understand your problem / question better?

  • Which image of the operator are you using? registry.opensource.zalan.do/acid/postgres-operator:v1.11.0
  • Where do you run it? GKE
  • Are you running Postgres Operator in production? yes
  • Type of issue? question

I'm trying to add backups to an existing cluster, to push WAL-E to GCS.

I first updated the Helm Chart as follows (after doing the GCP IAM stuff)

helm upgrade --install \
  postgres \
  postgres-operator-charts/postgres-operator \
  --reuse-values \
  --set aws_or_gcp.wal_gs_bucket=<bucket-name> \
  --set podServiceAccount.name=postgres-pod-custom \
  --namespace=operators \
  --wait

Was hoping that setting aws_or_gcp.wal_gs_bucket would be sufficient

I've also tried adding a ConfigMap for the operator

Still, the /run/etc/... directory that should house the necessary wal-e.d stuff does not exist

root@psql-0:/home/postgres# ls -lh
total 8.0K
lrwxrwxrwx 1 root     root    8 Mar  6 13:19 etc -> /run/etc    <- DOES NOT EXIST
drwxr-xr-x 4 root     root 4.0K Mar 22 23:55 pgdata
-rw-rw-r-- 1 postgres root  156 Mar  6 13:08 pgq_ticker.ini
lrwxrwxrwx 1 root     root   17 Mar  6 13:19 postgres.yml -> /run/postgres.yml

Any help & guidance is much appreciated, thanks!

@verdverm
Copy link
Author

Update, it seems this is the proper helm command

helm upgrade --install \          
  postgres \
  postgres-operator-charts/postgres-operator \
  --set configAwsOrGcp.wal_gs_bucket=<bucket name> \
  --set podServiceAccount.name=postgres-pod-custom \
  --namespace=operators \
  --wait

Note the format of --set configAwsOrGcp.wal_gs_bucket=<bucket name>

It seems this fills in the missing part, but now I am getting leader election issues. Does the instance fail to become healthy if it cannot connect to GCS via Workload Identity during startup?

@verdverm
Copy link
Author

@verdverm
Copy link
Author

Looks to be working for me now.

I would say the only change needed would be to update the docs to reflect the new command format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant