Skip to content

Commit

Permalink
fix: check for selector be nil
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianKramm committed Sep 30, 2024
1 parent 03dc781 commit 482118a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controllers/generic/export_syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ func (f *exporter) ExcludePhysical(_ client.Object) bool {
}

func (f *exporter) excludeObject(obj client.Object) bool {
if f.selector == nil {
return false
}

matches := f.selector.Matches(labels.Set(obj.GetLabels()))
return !matches
}

0 comments on commit 482118a

Please sign in to comment.