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

Missing region in barmanObjectStore.s3Credentials #454

Open
gpkc opened this issue Nov 29, 2024 · 2 comments
Open

Missing region in barmanObjectStore.s3Credentials #454

gpkc opened this issue Nov 29, 2024 · 2 comments

Comments

@gpkc
Copy link

gpkc commented Nov 29, 2024

I suspect from the current code, that region seems to be used just to infer the S3 endpoint if endpointURL is not provided, as seen:

https://github.com/cloudnative-pg/charts/blob/main/charts/cluster/templates/_barman_object_store.tpl#L18-L31

However, region is important for the AWS CLI functioning as it should set AWS_DEFAULT_REGION as well. Seems that upstream it is supported via barmanObjectStore.s3Credentials.region:

https://github.com/cloudnative-pg/cloudnative-pg/blob/main/docs/src/release_notes/old/v1.16.md?plain=1#L222-L223

If this is not possible, then some alternative S3 providers will not work. For instance, I am trying to setup OVH object stores for the backups, and if I run the command below using the same credentials I'm feeding barman:

AWS_ENDPOINT_URL_S3=https://s3.de.io.cloud.ovh.net aws s3 ls my-db-backups

it will not work. However, if I add --region or AWS_DEFAULT_REGION it works:

AWS_ENDPOINT_URL_S3=https://s3.de.io.cloud.ovh.net aws --region de s3 ls my-db-backups

@itay-grudev
Copy link
Collaborator

itay-grudev commented Dec 7, 2024

Just to understand - the functionality as it is works completely OK for the purposes of the database. Your problem is simply the fact that you cannot use the AWS CLI when you kubectl exec into the database pods. Is that correct?

@gpkc
Copy link
Author

gpkc commented Dec 7, 2024

@itay-grudev No the functionaly actually does not work. The backup keeps failing because the AWS_DEFAULT_REGION env var is missing
As it is right now, in the chart, if the endpointURL is provided, then s3.region is just thrown away

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

2 participants