Skip to content
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

use peer_metadata to get pod metadata info from istiod #411

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions deploy/helm/templates/l7-envoyfilter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,33 @@ spec:
port_value: 15019
filter_chains:
- filters:
- name: "envoy.filters.network.tcp_proxy"
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy
stat_prefix: main_interval
cluster: main_internal
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: kmesh
route_config:
name: default
virtual_hosts:
- name: default
domains:
- '*'
routes:
- match:
prefix: "/"
Copy link
Member

Choose a reason for hiding this comment

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

If we look at the new configdump from 1.22 waypoint this is changed to

- match:
    connectMatcher: {}

Copy link
Member Author

Choose a reason for hiding this comment

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

It is connectMatcher in 1.21 as well which is used to match HTTO CONNECTH request, refer: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-field-config-route-v3-routematch-connect-matcher

Because we don't use HBONE, change it to path matching.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, ic. This is not needed for us

route:
cluster: main_internal
http_filters:
- name: waypoint_downstream_peer_metadata
typed_config:
"@type": type.googleapis.com/udpa.type.v1.TypedStruct
type_url: type.googleapis.com/io.istio.http.peer_metadata.Config
value:
downstream_discovery:
- workload_discovery: {}
shared_with_upstream: true
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
listener_filters:
- name: "envoy.listener.kmesh_tlv"
typed_config:
Expand Down
30 changes: 26 additions & 4 deletions deploy/yaml/l7-envoyfilter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,33 @@ spec:
port_value: 15019
filter_chains:
- filters:
- name: "envoy.filters.network.tcp_proxy"
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy
stat_prefix: main_interval
cluster: main_internal
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: kmesh
route_config:
name: default
virtual_hosts:
- name: default
domains:
- '*'
routes:
- match:
prefix: "/"
route:
cluster: main_internal
http_filters:
- name: waypoint_downstream_peer_metadata
typed_config:
"@type": type.googleapis.com/udpa.type.v1.TypedStruct
type_url: type.googleapis.com/io.istio.http.peer_metadata.Config
value:
downstream_discovery:
- workload_discovery: {}
shared_with_upstream: true
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
listener_filters:
- name: "envoy.listener.kmesh_tlv"
typed_config:
Expand Down
Loading