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

feat: support shared bucket for backups #3481

Merged
merged 4 commits into from
Jul 17, 2023
Merged

Conversation

shreddedbacon
Copy link
Member

@shreddedbacon shreddedbacon commented Jul 6, 2023

Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated
  • PR title is ready for inclusion in changelog

As described in #3444 there is a limit on how many buckets there can be in S3.

This changes the behaviour of new projects to use a bucket derived from the deploytarget name, or from a defined sharedBaasBucketName field on the deploytarget.

There is currently a LAGOON_BAAS_BUCKET_NAME override variable that can also be defined in a project, so this still overrides the shared bucket even if the project is new. To revert to the shared bucket in this case is to simply delete the LAGOON_BAAS_BUCKET_NAME variable.

The change will now create the k8up path like so.

${sharedBaasBucketName}/baas-${projectName}

To convert an existing project to use the shared bucket, you will need to check for the existence of the override variable and remove it, and then update the project in the Lagoon API to set the projects sharedBaasBucket=true (platform-owner role required). This has the negative effect that it basically makes all the existing backups unusable. So transferring the data somehow will need to be done if you wish to retain those backups. A deployment will also need to be performed after setting the sharedBaasBucket value.

This requires uselagoon/build-deploy-tool#219 to work

Closing issues

closes #3444

@shreddedbacon shreddedbacon added this to the 2.15.3 milestone Jul 10, 2023
@shreddedbacon shreddedbacon marked this pull request as ready for review July 10, 2023 07:05
Copy link
Member

@rocketeerbkw rocketeerbkw left a comment

Choose a reason for hiding this comment

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

LGTM

@tobybellwood tobybellwood merged commit 7185e47 into main Jul 17, 2023
1 check passed
@tobybellwood tobybellwood deleted the shared-baas-bucket branch July 17, 2023 23:10
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

Successfully merging this pull request may close these issues.

Support Shared S3 Bucket for K8up Backups
3 participants