Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Add Support for GCS and Azure backups #401

Merged
merged 14 commits into from
Jan 24, 2023
Merged

Conversation

gunnarsundberg
Copy link
Contributor

@gunnarsundberg gunnarsundberg commented Jul 20, 2022

pgBackRest already supports backups to GCS buckets and Azure Storage. This PR removes the default S3 config to allow for alternate providers, adds a simple method of configuring a GCP service account key through secrets, and documentation for how to configure the Helm Chart to use S3, GCS, or Azure.

Issue: #272 and #389

@@ -510,6 +516,11 @@ spec:
name: {{ template "timescaledb.fullname" . }}-pgbackrest
defaultMode: 416 # 0640 permissions
optional: true
- name: pgbackrest-secrets
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You just made this secret mandatory, not just for those wanting to enable GCS backups, but for everyone.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be mandatory since line 523 is optional: true?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I stand corrected. I didn't see that and didn't know about the optional option.

charts/timescaledb-single/README.md Outdated Show resolved Hide resolved
@agronholm
Copy link
Contributor

Question: doesn't #389 affect this use case at all?

@gunnarsundberg
Copy link
Contributor Author

gunnarsundberg commented Jul 21, 2022

Yes it does. #390 would fix this, but adds Azure documentation through comments in values.yaml and does not store the Azure key through secrets. It may be confusing to have GCS and S3 documented in the admin guide, with Azure documented in values.yaml and a different key config method from GCS.

@agronholm
Copy link
Contributor

Yes, it would be preferable to get these changes coordinated (I am an Azure user myself).

@gunnarsundberg
Copy link
Contributor Author

Would you suggest I wait to see how 390 shakes out, or just go ahead and add Azure to this PR? Seems like 390 is hung up on something unrelated.

@agronholm
Copy link
Contributor

You should probably coordinate with its author. I'm just a concerned citizen :)

@gunnarsundberg gunnarsundberg changed the title Add Support for GCS backups Add Support for GCS and Azure backups Jul 21, 2022
Copy link
Contributor

@paulfantom paulfantom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work! 💯 Could you just fix those lint issues?

@agronholm
Copy link
Contributor

@gunnarsundberg Do you intend to finish this PR? I kinda need it. Let me know if I can help in any way, or if you'd like me to finish it myself.

@gunnarsundberg
Copy link
Contributor Author

@agronholm I intend to finish it but have been quite busy. If you'd like it finished in the immediate future I'm cool with you doing it. If not I'll pick it back up at a later time 🙂

@agronholm
Copy link
Contributor

@agronholm I intend to finish it but have been quite busy. If you'd like it finished in the immediate future I'm cool with you doing it. If not I'll pick it back up at a later time slightly_smiling_face

The easiest way would be if you granted me push access to your fork. Otherwise I could just copy everything to my fork and make a new PR, but I see that as unnecessary hassle.

@agronholm
Copy link
Contributor

@paulfantom would you mind approving the test run? I believe I've fixed the issue.

@DanChugani
Copy link

Is there anyway that we could rerun the tests to see the failure - would be nice to have this rolled into the main branch.

@shooit
Copy link

shooit commented Jan 2, 2023

Would also love to have this merged 🤞. We want to go to production soon on GKE and need support for backups to GCS.

@agronholm
Copy link
Contributor

Would also love to have this merged crossed_fingers. We want to go to production soon on GKE and need support for backups to GCS.

We're probably moving to the StackGres operator for deploying TimescaleDB.

Signed-off-by: Gunnar Sundberg <[email protected]>
@nhudson
Copy link
Contributor

nhudson commented Jan 19, 2023

@gunnarsundberg can you fix the linting issues? Looks like you just need to bump the helm chart version. 0.30.0 -> 0.31.0 should be fine.

Linting charts...

------------------------------------------------------------------------------------------------------------------------
 Charts to be processed:
------------------------------------------------------------------------------------------------------------------------
 timescaledb-single => (version: "0.30.0", path: "charts/timescaledb-single")
------------------------------------------------------------------------------------------------------------------------

Linting chart "timescaledb-single => (version: \"0.30.0\", path: \"charts/timescaledb-single\")"
Checking chart "timescaledb-single => (version: \"0.30.0\", path: \"charts/timescaledb-single\")" for a version bump...
Old chart version: 0.30.0
Error: failed linting charts: failed processing charts
New chart version: 0.30.0
------------------------------------------------------------------------------------------------------------------------
 ✖︎ timescaledb-single => (version: "0.30.0", path: "charts/timescaledb-single") > chart version not ok. Needs a version bump! 
make: *** [Makefile:[16](https://github.com/timescale/helm-charts/actions/runs/3955995463/jobs/6776051445#step:6:17): lint] Error 1
------------------------------------------------------------------------------------------------------------------------
failed linting charts: failed processing charts
Error: Process completed with exit code 2.

@gunnarsundberg
Copy link
Contributor Author

gunnarsundberg commented Jan 19, 2023

@nhudson done!

@nhudson
Copy link
Contributor

nhudson commented Jan 23, 2023

@gunnarsundberg looks like there is a lint issue and if you don't mind rebasing again?

@nhudson nhudson merged commit 3a84626 into timescale:main Jan 24, 2023
klaus385 pushed a commit to klaus385/timescaledb-kubernetes that referenced this pull request Apr 26, 2023
* add pgbackrest-secrets for gcs service key

* add documentation for backing up to gcs

* clean up gcs backup documentation and fix example

* revert autogenerated toc changes

* check for empty pgbackrest secret (for gcs)

* remove s3 defaults and add examples for backup providers

* add documentation for s3 azure and gcs changes

* Fixed linting error

* bump chart version

* remove trailing space

Signed-off-by: Gunnar Sundberg <[email protected]>
Co-authored-by: Alex Grönholm <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants