Skip to content

Commit

Permalink
Filter out endpoints if targetfiltersource filters out all targets
Browse files Browse the repository at this point in the history
  • Loading branch information
BadLiveware committed Mar 5, 2023
1 parent 39d81a2 commit 6c64c1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/targetfiltersource.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ func (ms *targetFilterSource) Endpoints(ctx context.Context) ([]*endpoint.Endpoi
}
}

// If all targets are filtered out, skip the endpoint.
if len(filteredTargets) == 0 {
continue
}

ep.Targets = filteredTargets

result = append(result, ep)
Expand Down

0 comments on commit 6c64c1e

Please sign in to comment.