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(backup): multiple backup stores support #2182

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

mantissahz
Copy link
Contributor

Support multiple backup stores to create, delete and update them.
Remove the default backup target instead using Default flag in BackupTarget CR spec.
Adding a flag ReadOnly in BackupTarget CR spec prevent backups from being created and storing on this remote backup target.
And provide HTTP endpoints to create, delete, update and list secrets.

Ref: longhorn/longhorn#5411

@mergify
Copy link

mergify bot commented Oct 25, 2023

This pull request is now in conflicts. Could you fix it @mantissahz? 🙏

@mergify
Copy link

mergify bot commented Oct 27, 2023

This pull request is now in conflicts. Could you fix it @mantissahz? 🙏

@innobead
Copy link
Member

Is this ready for review?

@mantissahz
Copy link
Contributor Author

Is this ready for review?

@innobead Yes, but LEP longhorn/longhorn#6630 is still in review.

@mantissahz mantissahz marked this pull request as ready for review November 22, 2023 01:23
@mantissahz mantissahz requested a review from a team as a code owner November 22, 2023 01:23
@mantissahz mantissahz force-pushed the issue5411 branch 3 times, most recently from c1e1178 to 4cdb679 Compare November 23, 2023 16:48
@mantissahz mantissahz marked this pull request as draft November 30, 2023 02:10
@mantissahz mantissahz marked this pull request as ready for review December 4, 2023 03:19
Copy link
Contributor

@james-munson james-munson left a comment

Choose a reason for hiding this comment

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

Still reviewing, but one question already.

api/model.go Outdated Show resolved Hide resolved
api/model.go Outdated Show resolved Hide resolved
Copy link
Contributor

@james-munson james-munson left a comment

Choose a reason for hiding this comment

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

Just a couple of minor things.

controller/backup_target_controller.go Outdated Show resolved Hide resolved
controller/backup_target_controller.go Outdated Show resolved Hide resolved
controller/backup_target_controller.go Outdated Show resolved Hide resolved
controller/backup_target_controller.go Outdated Show resolved Hide resolved
webhook/resources/backuptarget/validator.go Show resolved Hide resolved
webhook/resources/backuptarget/validator.go Show resolved Hide resolved
@mantissahz mantissahz requested review from ChanYiLin and a team December 12, 2023 09:08
Introduce a new filed `BackupTargetName` in `Volume.Spec` to point
out where the volume will be backed up to.

ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
List backup volume CRs using a backup target name.
List backup volume CRs using a volume name.
Get a backup volume using a backup target name and a volume name.

Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Add the backup target mutator and add the finalizer into
the backupTarget CR when mutating.

ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Add the volume mutation and validation to handle the field
`Spec.BackupTargetName`.
Add a new label "backup-target".

Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Add fields `Spec.BackingImage` and `Spec.BackupTargetName`
in the BackupBackingImage CRD

Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
1. Add the deleting function.
2. Modify the synchronizing backup volumes and backup backing images
   from a backup target methods.
3. `sets.String` is deprecated and use generic `Set` instead

Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Move backupTimer from setting controller to backup target controller
Move AWS IAM Role Annotation logic to datastore/kubernetes.go

Ref: 5411, 6947

Signed-off-by: James Lu <james.lu@suse.com>
Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Remove adding `backup-target` back when node is updated.
Remove backup targets when uninstalling.

ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Introduce a new filed `BackupTargetName` in `Volume.Spec` to point
out where the volume will be backed up to.

ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Modify backup volume controller to support multiple backup stores
support. Synchronize and handle the backup volumes information from
different backup targets with the same backup volume name or not.

Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Modify backup controller to support multiple backup stores support.
Synchronize and handle the backup information from different backup
targets with the same backup volume name or not.

Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
@mantissahz mantissahz force-pushed the issue5411 branch 2 times, most recently from 3aa2730 to 50c6d74 Compare September 26, 2024 09:22
Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
add the method to get the correct BackupVolume with the volume name
and backup target name for the recurring job and related data
strucurtes of APIs.

Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Add more parameters in creating BackupVolume for testing
volume_controller.go

Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Add more parameters in creating BackupVolume for testing
volume_controller.go

Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Upgrade CRs for Volume, BackupVolume, Backup, BackupBackingImage,
and BackingImageDataSource.

Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
Ref: 5411

Signed-off-by: James Lu <james.lu@suse.com>
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.

4 participants