Skip to content

Commit 8ff2a47

Browse files
committed
skip namespace filtering for loki case
1 parent ff642b2 commit 8ff2a47

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/loki/flow_query.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ func (q *FlowQueryBuilder) Filters(queryFilters filters.SingleQuery) error {
108108
}
109109

110110
func (q *FlowQueryBuilder) addFilter(filter filters.Match) error {
111-
if !filterRegexpValidation.MatchString(filter.Values) {
111+
// namespace filtering is managed by loki gateway so we can simply skip it
112+
if filter.Key == "namespace" {
113+
return nil
114+
} else if !filterRegexpValidation.MatchString(filter.Values) {
112115
return fmt.Errorf("unauthorized sign in flows request: %s", filter.Values)
113116
}
114117

0 commit comments

Comments
 (0)