Skip to content

feat(core): Add fieldSelector to events_list and namespaces_list tools#1138

Open
difrost wants to merge 5 commits into
containers:mainfrom
difrost:feat-fieldSelector-in-events-namespaces
Open

feat(core): Add fieldSelector to events_list and namespaces_list tools#1138
difrost wants to merge 5 commits into
containers:mainfrom
difrost:feat-fieldSelector-in-events-namespaces

Conversation

@difrost
Copy link
Copy Markdown
Contributor

@difrost difrost commented May 6, 2026

This PR adds fieldSelector property to events_list and namespaces_list in a similar fashion how it's defined for e.g. pods_list.

The biggest added values is for the events_list where a tool call on a busy namespace with a lot of events generated is killing most of the agents.

I've also added evals for both tool extensions but can't figure a better way than just verifying with llmJudge contains.

@Cali0707 / @manusa please review.

Signed-off-by: Jacek Luczak <difrost.kernel@gmail.com>
Signed-off-by: Jacek Luczak <difrost.kernel@gmail.com>
@matzew
Copy link
Copy Markdown
Collaborator

matzew commented May 7, 2026

Consider adding a unit test for fieldSelector in pkg/mcp/events_test.go, similar to the existing events_list(namespace=ns-1) test ?

…Selector

Signed-off-by: Jacek Luczak <difrost.kernel@gmail.com>
@difrost
Copy link
Copy Markdown
Contributor Author

difrost commented May 7, 2026

@matzew - 0812a5e adds tests for events_list and namespaces_list.

@@ -0,0 +1,2 @@
#!/usr/bin/env bash
kubectl delete namespace event-filter-test --ignore-not-found
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should it be events-filter-test ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @matzew - fixed in 87d187a

Signed-off-by: Jacek Luczak <difrost.kernel@gmail.com>
@difrost difrost requested a review from matzew May 12, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants