Hi All,
I met this question. I want to filters order:grpc->http->tcp.
Error: terminal filter named envoy.filters.network.http_connection_manager of type envoy.filters.network.http_connection_manager must be the last filter in a network filter chain.
here is the configuration.
static_resources:
listeners:
- namstatic_resources:
listeners:
- name: listener_0
address:
socket_address:
address: 0.0.0.0
port_value: 9901
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
stat_prefix: ingress_http
codec_type: AUTO
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains:
- "*"
routes:
- match:
prefix: /
headers:
- name: content-type
string_match:
exact: application/grpc
route:
cluster: grpc_service
- match:
prefix: /
route:
cluster: http_service
http_filters:
- name: envoy.filters.http.router
- name: envoy.filters.network.tcp_proxy
typed_config:
stat_prefix: ingress_tcp
max_connect_attempts: 5
cluster: tcp_service
clusters:
- name: grpc_service
connect_timeout: 0.25s
type: STATIC
lb_policy: ROUND_ROBIN
typed_extension_protocol_options:
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
explicit_http_config:
http2_protocol_options: {}
load_assignment:
cluster_name: grpc_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 192.168.56.2
port_value: 10010
- name: http_service
connect_timeout: 0.25s
type: STATIC
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: http_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 192.168.56.2
port_value: 10020
- name: tcp_service
connect_timeout: 0.25s
type: STATIC
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: tcp_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 192.168.56.2
port_value: 10030
e: listener_0
address:
socket_address:
address: 0.0.0.0
port_value: 9901
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
stat_prefix: ingress_http
codec_type: AUTO
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains:
- "*"
routes:
- match:
prefix: /
headers:
- name: content-type
string_match:
exact: application/grpc
route:
cluster: grpc_service
- match:
prefix: /
route:
cluster: http_service
http_filters:
- name: envoy.filters.http.router
- name: envoy.filters.network.tcp_proxy
typed_config:
stat_prefix: ingress_tcp
max_connect_attempts: 5
cluster: tcp_service
clusters:
- name: grpc_service
connect_timeout: 0.25s
type: STATIC
lb_policy: ROUND_ROBIN
typed_extension_protocol_options:
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
explicit_http_config:
http2_protocol_options: {}
load_assignment:
cluster_name: grpc_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 192.168.56.2
port_value: 10010
- name: http_service
connect_timeout: 0.25s
type: STATIC
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: http_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 192.168.56.2
port_value: 10020
- name: tcp_service
connect_timeout: 0.25s
type: STATIC
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: tcp_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 192.168.56.2
port_value: 10030