Skip to content

Conversation

@yuval-k
Copy link
Contributor

@yuval-k yuval-k commented Nov 25, 2025

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

/kind feature

Changelog

Add stats matcher config to GatewayPparameters

@gateway-bot gateway-bot added kind/feature Categorizes issue or PR as related to a new feature. release-note labels Nov 25, 2025
@yuval-k yuval-k changed the title featu: add stat matcher config to gatewayparameters feat: add stat matcher config to gatewayparameters Nov 25, 2025
Copy link
Contributor

@puertomontt puertomontt left a 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

yuval-k and others added 3 commits November 26, 2025 08:44
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]>
@yuval-k yuval-k marked this pull request as ready for review November 26, 2025 14:27
Copilot AI review requested due to automatic review settings November 26, 2025 14:27
Copy link
Contributor

Copilot AI left a 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 StatsMatcher and reused StringMatcher types 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.

@yuval-k yuval-k enabled auto-merge November 26, 2025 16:39
@yuval-k yuval-k added this pull request to the merge queue Nov 26, 2025
Merged via the queue into main with commit b1e1a29 Nov 26, 2025
30 checks passed
@yuval-k yuval-k deleted the yuval-k/stats-inclusion branch November 26, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes issue or PR as related to a new feature. release-note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add stats exclusion to GwParams

5 participants