Skip to content

Commit dc1f985

Browse files
wangyeleiapecloud-bot
authored andcommitted
fix: restore is always running (#9781)
(cherry picked from commit c664636)
1 parent ed9c364 commit dc1f985

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

controllers/dataprotection/restore_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ func (r *RestoreReconciler) parseRestorePod(ctx context.Context, object client.O
132132
var requests []reconcile.Request
133133
restoreName := pod.Labels[dprestore.DataProtectionRestoreLabelKey]
134134
restoreNamespace := pod.Labels[dprestore.DataProtectionRestoreNamespaceLabelKey]
135+
if restoreNamespace == "" {
136+
restoreNamespace = object.GetNamespace()
137+
}
135138
if restoreName != "" {
136139
requests = append(requests, reconcile.Request{
137140
NamespacedName: types.NamespacedName{

0 commit comments

Comments
 (0)