istio / ztunnel

The `ztunnel` component of ambient mesh
Apache License 2.0
308 stars 101 forks source link

xds: gracefully handle stream termination without error #1368

Closed howardjohn closed 4 days ago

howardjohn commented 1 week ago

Today, we only reconnect on the stream erroring. If it ends with a success, we ~infinite loop doing nothing.

In standard operations, Istiod will never end the stream without an error. However, it is possible to expose Istiod with a proxy that does.

howardjohn commented 1 week ago

Reproducer:

```yaml admin: address: socket_address: { address: 127.0.0.1, port_value: 9901 } static_resources: listeners: - name: listener_0 address: socket_address: { address: 127.0.0.1, port_value: 15011 } 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: ingress_http stream_idle_timeout: 2s codec_type: AUTO route_config: name: local_route virtual_hosts: - name: local_service domains: ["*"] routes: - match: { prefix: "/" } route: { cluster: some_service } http_filters: - name: envoy.filters.http.router typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router clusters: - name: some_service connect_timeout: 0.25s type: STATIC lb_policy: ROUND_ROBIN load_assignment: cluster_name: some_service endpoints: - lb_endpoints: - endpoint: address: socket_address: address: 127.0.0.1 port_value: 15010 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: connection_keepalive: interval: 30s timeout: 5s ``` `PROXY_WORKLOAD_INFO=default/local/default PROXY_MODE=dedicated FAKE_CA=true XDS_ADDRESS="http://localhost:15011" cargo run -F testing`
istio-testing commented 4 days ago

In response to a cherrypick label: new pull request created: #1370