feat: support shared bucket for backups #3481
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
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 definedsharedBaasBucketName
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 isnew
. To revert to the shared bucket in this case is to simply delete theLAGOON_BAAS_BUCKET_NAME
variable.The change will now create the k8up path like so.
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 thesharedBaasBucket
value.This requires uselagoon/build-deploy-tool#219 to work
Closing issues
closes #3444