Skip to content

Commit d2a417e

Browse files
author
Emruz Hossain
committed
Fix target matcher
Signed-off-by: Emruz Hossain <emruz@appscode.com>
1 parent 8c33614 commit d2a417e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/backup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ func (opt *options) backupManifests(targetRef v1beta1.TargetRef) (*restic.Backup
222222
}
223223

224224
func (opt *options) targetMatched(tref v1beta1.TargetRef, expected v1beta1.TargetRef) bool {
225-
if expected.Namespace == "" {
225+
if expected.Namespace == "" && tref.Namespace != "" {
226226
expected.Namespace = opt.namespace
227227
}
228228
return tref.Kind == expected.Kind && tref.Name == expected.Name && tref.Namespace == expected.Namespace

0 commit comments

Comments
 (0)