Skip to content

Conversation

@AritraDey-Dev
Copy link
Member

Description

This PR adds regex-based namespace filtering for events. Previously, the export allow/deny list only supported exact namespace matches, which made managing multiple similarly named namespaces difficult.(please review commit-wise).

tetra getevents --namespace-regex 'prod-.*'

Changelog

Add regex support for namespace filtering in export allow/deny lists

@AritraDey-Dev AritraDey-Dev requested a review from a team as a code owner January 21, 2026 23:56
@netlify
Copy link

netlify bot commented Jan 21, 2026

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit c5ae960
🔍 Latest deploy log https://app.netlify.com/projects/tetragon/deploys/697167a662d52000082f04aa
😎 Deploy Preview https://deploy-preview-4554--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@olsajiri olsajiri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be easier to review if you split the generated changes to the separated commit, otherwise lgtm

@AritraDey-Dev AritraDey-Dev force-pushed the pr/aritra/namespace-regex-filter branch from c5ae960 to 60a2584 Compare January 22, 2026 14:34
@AritraDey-Dev
Copy link
Member Author

would be easier to review if you split the generated changes to the separated commit

done.

@AritraDey-Dev AritraDey-Dev force-pushed the pr/aritra/namespace-regex-filter branch from 60a2584 to 8048331 Compare January 22, 2026 14:42
Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm as well, one nit, but either is good I imagine, it's mergeable like that, thanks for splitting into commits it looks great like that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe you can put this into the already existing namespace_test.go.

@mtardy mtardy added the release-note/minor This PR introduces a minor user-visible change label Jan 22, 2026
@mtardy
Copy link
Member

mtardy commented Jan 22, 2026

you need to satisfy the CI however, you might need to bundle the generated changes with the actual changes to make every commit to build. You'll need to generate docs etc. The output should be understandable

@AritraDey-Dev
Copy link
Member Author

you might need to bundle the generated changes with the actual changes to make every commit to build

Yes, for every commit to build, the generated changes should be bundled into a single commit. I didn’t think about that while splitting this.should I squash it back into one?

The other CI failure looks like a gitHub status issue; there seems to be some disruption according to https://www.githubstatus.com/ .

@AritraDey-Dev AritraDey-Dev force-pushed the pr/aritra/namespace-regex-filter branch from 8048331 to cd1c060 Compare January 22, 2026 15:24
This commit adds a new field to the Filter protobuf message that
allows filtering events by namespace using regular expressions.The
field follows the same pattern as other regex fields like binary_regex
and pod_regex.

Signed-off-by: Aritra Dey <[email protected]>
Right now filtering events by namespace only works with exact matches.
This is a problem when you have many namespaces that follow a pattern.

This adds a new filter field called namespace_regex that lets
users use regex instead. So now you can write patterns
like 'prod-.*' or 'dev-.*' to match multiple namespaces at once.

Signed-off-by: Aritra Dey <[email protected]>
This adds a new flag to the tetra CLI so users can test the namespace
regex filter directly from the command line.

Example:

```
tetra getevents --namespace-regex 'prod-.*'

cat events.json | tetra getevents --namespace-regex 'prod-.*' -o compact
```

Signed-off-by: Aritra Dey <[email protected]>
This commit adds tests to verify the namespace regex filter works correctly.

Signed-off-by: Aritra Dey <[email protected]>
@AritraDey-Dev AritraDey-Dev force-pushed the pr/aritra/namespace-regex-filter branch from cd1c060 to 07c3b9c Compare January 22, 2026 15:39
@AritraDey-Dev
Copy link
Member Author

AritraDey-Dev commented Jan 22, 2026

Updated now! the generated code(api changes) into its own commit and kept the regex logic in a separate commit.

Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome thanks

@mtardy mtardy merged commit bf77cb4 into cilium:main Jan 22, 2026
56 checks passed
@AritraDey-Dev AritraDey-Dev deleted the pr/aritra/namespace-regex-filter branch January 22, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/minor This PR introduces a minor user-visible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants