-
Notifications
You must be signed in to change notification settings - Fork 631
feat: add stat matcher config to gatewayparameters #12985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Yuval Kohavi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Some test outputs need updating
Signed-off-by: Yuval Kohavi <[email protected]>
Co-authored-by: Omar Hammami <[email protected]> Signed-off-by: Yuval Kohavi <[email protected]>
Signed-off-by: Yuval Kohavi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for configuring Envoy stats matcher (inclusion/exclusion lists) via GatewayParameters to help limit stats emission in high-scale scenarios. The implementation adds a new Matcher field to StatsConfig that allows users to specify either an inclusion or exclusion list of string matchers to control which Envoy stats are emitted.
Key changes:
- Added
StatsMatcherand reusedStringMatchertypes to the API with CRD validation ensuring mutual exclusivity - Implemented conversion from API types to Helm values and rendering in Envoy bootstrap configuration
- Added comprehensive test coverage for both inclusion and exclusion list scenarios
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| api/v1alpha1/gateway_parameters_types.go | Added StatsMatcher struct and Matcher field to StatsConfig with getter methods |
| api/v1alpha1/zz_generated.deepcopy.go | Auto-generated deepcopy methods for new StatsMatcher type |
| install/helm/kgateway-crds/templates/gateway.kgateway.dev_gatewayparameters.yaml | Added CRD schema for matcher with mutual exclusion validation and string matcher definitions |
| pkg/deployer/values.go | Added HelmStatsMatcher and HelmStringMatcher structs for Helm values |
| pkg/deployer/values_helpers.go | Implemented conversion logic from API StatsMatcher to Helm values |
| pkg/deployer/merge.go | Added matcher field to stats config merge logic |
| internal/kgateway/helm/envoy/templates/configmap.yaml | Added Envoy bootstrap stats_config rendering with inclusion/exclusion list support |
| pkg/deployer/deployer_test.go | Added integration tests verifying inclusion and exclusion list rendering in Envoy bootstrap |
| examples/example-gatewayparameters-stats-matcher.yaml | Added example demonstrating stats matcher configuration usage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
install/helm/kgateway-crds/templates/gateway.kgateway.dev_gatewayparameters.yaml
Show resolved
Hide resolved
Signed-off-by: Yuval Kohavi <[email protected]>
Signed-off-by: Yuval Kohavi <[email protected]>
Signed-off-by: Yuval Kohavi <[email protected]>
Signed-off-by: Yuval Kohavi <[email protected]>
Signed-off-by: Yuval Kohavi <[email protected]>
fixes #11284
Description
In high scale scenarios it's helpful to limit the emount of stats envoy emits. This change adds config toggles for tune the stats emission.
Change Type
Changelog