-
Notifications
You must be signed in to change notification settings - Fork 363
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
feat: support statsmatch from proxy metric #1826
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7b3a7f6
feat: support stats match for gateway
3058c4c
fix coverage test
6f9caa3
fix gen check
1b6a731
fix code
a9601c0
fix some comments
c24bb64
fix code and update api
028d764
fix code
545d686
fix code
1285bf2
Merge branch 'main' into dev-add-stats-matcher-code
d6b7f81
Merge branch 'main' into dev-add-stats-matcher-code
zirain c5527b1
Merge branch 'main' into dev-add-stats-matcher-code
520b44e
Merge branch 'main' into dev-add-stats-matcher-code
zirain 5acd660
fix conflict
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
133 changes: 133 additions & 0 deletions
133
internal/xds/bootstrap/testdata/custom-stats-matcher.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
admin: | ||
access_log: | ||
- name: envoy.access_loggers.file | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog | ||
path: /dev/null | ||
address: | ||
socket_address: | ||
address: 127.0.0.1 | ||
port_value: 19000 | ||
stats_config: | ||
stats_matcher: | ||
inclusion_list: | ||
patterns: | ||
- prefix: http | ||
- prefix: cluster | ||
- suffix: upstream_rq | ||
- safe_regex: | ||
google_re2: {} | ||
regex: virtual.* | ||
dynamic_resources: | ||
ads_config: | ||
api_type: DELTA_GRPC | ||
transport_api_version: V3 | ||
grpc_services: | ||
- envoy_grpc: | ||
cluster_name: xds_cluster | ||
set_node_on_first_message_only: true | ||
lds_config: | ||
ads: {} | ||
resource_api_version: V3 | ||
cds_config: | ||
ads: {} | ||
resource_api_version: V3 | ||
static_resources: | ||
listeners: | ||
- name: envoy-gateway-proxy-ready-0.0.0.0-19001 | ||
address: | ||
socket_address: | ||
address: 0.0.0.0 | ||
port_value: 19001 | ||
protocol: TCP | ||
filter_chains: | ||
- filters: | ||
- name: envoy.filters.network.http_connection_manager | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager | ||
stat_prefix: eg-ready-http | ||
route_config: | ||
name: local_route | ||
virtual_hosts: | ||
- name: prometheus_stats | ||
domains: | ||
- "*" | ||
routes: | ||
- match: | ||
prefix: /stats/prometheus | ||
route: | ||
cluster: prometheus_stats | ||
http_filters: | ||
- name: envoy.filters.http.health_check | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck | ||
pass_through_mode: false | ||
headers: | ||
- name: ":path" | ||
string_match: | ||
exact: /ready | ||
- name: envoy.filters.http.router | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router | ||
clusters: | ||
- name: prometheus_stats | ||
connect_timeout: 0.250s | ||
type: STATIC | ||
lb_policy: ROUND_ROBIN | ||
load_assignment: | ||
cluster_name: prometheus_stats | ||
endpoints: | ||
- lb_endpoints: | ||
- endpoint: | ||
address: | ||
socket_address: | ||
address: 127.0.0.1 | ||
port_value: 19000 | ||
- connect_timeout: 10s | ||
load_assignment: | ||
cluster_name: xds_cluster | ||
endpoints: | ||
- lb_endpoints: | ||
- endpoint: | ||
address: | ||
socket_address: | ||
address: envoy-gateway | ||
port_value: 18000 | ||
typed_extension_protocol_options: | ||
envoy.extensions.upstreams.http.v3.HttpProtocolOptions: | ||
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions" | ||
explicit_http_config: | ||
http2_protocol_options: {} | ||
name: xds_cluster | ||
type: STRICT_DNS | ||
http2_protocol_options: | ||
connection_keepalive: | ||
interval: 30s | ||
timeout: 5s | ||
transport_socket: | ||
name: envoy.transport_sockets.tls | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext | ||
common_tls_context: | ||
tls_params: | ||
tls_maximum_protocol_version: TLSv1_3 | ||
tls_certificate_sds_secret_configs: | ||
- name: xds_certificate | ||
sds_config: | ||
path_config_source: | ||
path: "/sds/xds-certificate.json" | ||
resource_api_version: V3 | ||
validation_context_sds_secret_config: | ||
name: xds_trusted_ca | ||
sds_config: | ||
path_config_source: | ||
path: "/sds/xds-trusted-ca.json" | ||
resource_api_version: V3 | ||
layered_runtime: | ||
layers: | ||
- name: runtime-0 | ||
rtds_layer: | ||
rtds_config: | ||
ads: {} | ||
resource_api_version: V3 | ||
name: runtime-0 |
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.
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.
❤️