-
Notifications
You must be signed in to change notification settings - Fork 136
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
base: master
Are you sure you want to change the base?
Conversation
This pull request is now in conflicts. Could you fix it @mantissahz? 🙏 |
This pull request is now in conflicts. Could you fix it @mantissahz? 🙏 |
a782b93
to
142535f
Compare
Is this ready for review? |
@innobead Yes, but LEP longhorn/longhorn#6630 is still in review. |
c1e1178
to
4cdb679
Compare
There was a problem hiding this 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.
There was a problem hiding this 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.
4e67c1e
to
fe4d30c
Compare
Introduce new fields `BackupTargetURL` and `BackupTargetName` in `Spec` of Backup CRD to support multiple backup targets. Ref: 5411 Signed-off-by: James Lu <james.lu@suse.com>
Introduce new fields `BackupTargetURL`, `BackupTargetName` and `VolumeName` in `Spec` of BackupVolume CRD to support multiple backup targets. Ref: 5411 Signed-off-by: James Lu <james.lu@suse.com>
Introduce new fields `Default` and `ReadOnly` in `Status` of BackupTarget CRD to support multiple backup targets. Ref: 5411 Signed-off-by: James Lu <james.lu@suse.com>
List backup volume CRs by the label `backup-target` that is a backup target name and get last updated backup volume CR by 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>
Ref: 5411 Signed-off-by: James Lu <james.lu@suse.com>
Remove the default backup target from setting controller and add the timer for each backup target for polling interval. Ref:5411 Signed-off-by: James Lu <james.lu@suse.com>
Remove global settings `backup-target`, `backup-target-credential-secret` and `backupstore-poll-interval`. 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>
Replace the value of the field `BackupTargetURL` of Backup CR spec by the default backup target URL if it is empty when mutating. Ref: 5411 Signed-off-by: James Lu <james.lu@suse.com>
For restoration, the BackupVolume CR name will not be the same to the backup volume name in the `fromBackup` URL in Volume spec. Set engine.Spec.BackupVolume as BackupVolume CR name. Introduce a new field `BackupTargetName` in Engine Spec to get the backup target status when creating a volume by restoring a backup. Ref: 5411 Signed-off-by: James Lu <james.lu@suse.com>
Add a new filed `BackupTargetName` in RecurringJob spec and related data strucurtes of APIs and recurring job app. Ref: 5411 Signed-off-by: James Lu <james.lu@suse.com>
The first backup target will become the default backup target whether the `Default` in `Spec` is set `true` or not. If it is not the first backup target with the `Default` in `Spec` set `true`, backup target controller will set `Default` false both in `Spec` and `Status` for previous default backup target and then setup new backup target as a default one. Ref: 5411 Signed-off-by: James Lu <james.lu@suse.com>
Get the default backup target by `Status.Default` instead of gettting backup target by `types.DefaultBackupTargetName`. Ref:5411 Signed-off-by: James Lu <james.lu@suse.com>
Check if creating backup is on a read-only backup target or not. Ref: 5411 Signed-off-by: James Lu <james.lu@suse.com>
Add secret HTTP apis: "SecretCreate", "SecretGet", "SecretList", "SecretUpdate" and "SecretDelete". 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>
Support multiple backup stores. Ref: 5411 Signed-off-by: James Lu <james.lu@suse.com>
Ref: 5411 Signed-off-by: James Lu <james.lu@suse.com>
Move AWS IAM Role Annotation implementations to datastore/kubernetes.go and trigger it by backup target validator. Ref: 5411, 6947 Signed-off-by: James Lu <james.lu@suse.com>
Upgrade CRs for Engine, BackupTarget, BackupVolume, Backup, and RecurringJob. Ref: 5411 Signed-off-by: James Lu <james.lu@suse.com>
sets.String is deprecated: use generic Set instead Ref: longhorn/longhorn 5411 Signed-off-by: James Lu <james.lu@suse.com>
Ref: 5411 Signed-off-by: James Lu <james.lu@suse.com>
Ref: longhorn/longhorn 5411 Signed-off-by: James Lu <james.lu@suse.com>
Ref: longhorn/longhorn 5411 Signed-off-by: James Lu <james.lu@suse.com>
Ref: longhorn/longhorn 5411 Signed-off-by: James Lu <james.lu@suse.com>
Ref: longhorn/longhorn 5411 Signed-off-by: James Lu <james.lu@suse.com>
Support multiple backup stores to create, delete and update them.
Remove the
default
backup target instead usingDefault
flag inBackupTarget
CR spec.Adding a flag
ReadOnly
inBackupTarget
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