Repository navigation
feat: Add /eventResources and report resource counts in the EventTrigger details - #195
Merged
gianlucam76 merged 1 commit intoOct 17, 2026
Conversation
…ger details An EventTrigger can match hundreds of resources per cluster. /event returned all of them for every matching cluster in a single response, which made the payload large and the dashboard page slow. This change returns only the number of matching resources per cluster, and adds a paginated endpoint to list them on demand. Changes - /event: each entry in clusterEventMatches now has matchingResourcesCount instead of the resources array. This is a breaking change to the response. The dashboard is the only consumer: mcp-server reads EventReports directly. - New GET /eventResources?event_name=<eventTrigger>&namespace=<cluster-namespace>&name=<cluster-name>&type=<capi|sveltos>: - Returns totalResources and one page of resources, ordered by group, kind, namespace and name. - Supports limit and skip. - Supports filters resource_kind, resource_namespace and resource_name, as a case-insensitive substring match. totalResources is counted after filtering and before pagination. - The user needs permission to get both the EventTrigger and the cluster. The response is 400 for a bad request, 404 for an unknown EventTrigger and 401 without permission. A cluster with no EventReport returns an empty list. - README updated for both endpoints.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An EventTrigger can match hundreds of resources per cluster. /event returned all of them for every matching cluster in a single response, which made the payload large and the dashboard page slow. This change returns only the number of matching resources per cluster, and adds a paginated endpoint to list them on demand.
Changes