Skip to content

Commit

Permalink
fix: exclude import by other vclusters (#2365)
Browse files Browse the repository at this point in the history
(cherry picked from commit e104897)
  • Loading branch information
FabianKramm committed Jan 2, 2025
1 parent 4542ec6 commit 39c344c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/mappings/generic/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ func TryToTranslateBackByAnnotations(ctx *synccontext.SyncContext, req types.Nam
return types.NamespacedName{}
}

// exclude objects that are from other vClusters
markerLabel := pObj.GetLabels()[translate.MarkerLabel]
if markerLabel != "" && markerLabel != translate.VClusterName {
return types.NamespacedName{}
}

// make sure kind matches
gvk, ok := pAnnotations[translate.KindAnnotation]
if ok && objectGvk.String() != gvk {
Expand Down

0 comments on commit 39c344c

Please sign in to comment.