Skip to content

Commit 84e8169

Browse files
authored
chore: add an annotation to skip restoration check when do the backup (#9669)
1 parent 356fef2 commit 84e8169

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

controllers/dataprotection/backup_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,9 @@ func (r *BackupReconciler) syncContinuousBackupEncryptionConfig(reqCtx intctrlut
682682
}
683683

684684
func (r *BackupReconciler) checkRestoreInProgress(reqCtx intctrlutil.RequestCtx, backup *dpv1alpha1.Backup) (restoreInProgress bool, err error) {
685+
if backup.Annotations[dptypes.SkipRestorationCheckAnnotationKey] == trueVal {
686+
return false, nil
687+
}
685688
clusterName, ok := backup.Labels[constant.AppInstanceLabelKey]
686689
if !ok {
687690
reqCtx.Log.V(2).Info("AppInstanceLabel not found")

pkg/dataprotection/types/constant.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ const (
6666
LastAppliedConfigsAnnotationKey = "dataprotection.kubeblocks.io/last-applied-configurations"
6767
// SkipReconciliationAnnotationKey specifies whether to skip reconciliation.
6868
SkipReconciliationAnnotationKey = "dataprotection.kubeblocks.io/skip-reconciliation"
69+
// SkipRestorationCheckAnnotationKey specifies whether to skip restoration check.
70+
SkipRestorationCheckAnnotationKey = "dataprotection.kubeblocks.io/skip-restoration-check"
6971
)
7072

7173
// label keys

0 commit comments

Comments
 (0)