From b0883b56a59e5572764ae84024243cd8bf01c9fd Mon Sep 17 00:00:00 2001 From: David Maixner Date: Sat, 20 Jun 2020 11:40:46 +0200 Subject: [PATCH] [fix] envoy deprecated fields This gets rid of warnings in envoy log files for deprecated fields. --- net/grpc/gateway/examples/echo/envoy.yaml | 21 +++++++++++++------ .../gateway/examples/helloworld/envoy.yaml | 21 +++++++++++++------ test/interop/envoy.yaml | 21 +++++++++++++------ 3 files changed, 45 insertions(+), 18 deletions(-) diff --git a/net/grpc/gateway/examples/echo/envoy.yaml b/net/grpc/gateway/examples/echo/envoy.yaml index 9e13b7c6..7cd4aeb4 100644 --- a/net/grpc/gateway/examples/echo/envoy.yaml +++ b/net/grpc/gateway/examples/echo/envoy.yaml @@ -10,8 +10,9 @@ static_resources: socket_address: { address: 0.0.0.0, port_value: 8080 } filter_chains: - filters: - - name: envoy.http_connection_manager - config: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager codec_type: auto stat_prefix: ingress_http route_config: @@ -32,13 +33,21 @@ static_resources: max_age: "1728000" expose_headers: custom-header-1,grpc-status,grpc-message http_filters: - - name: envoy.grpc_web - - name: envoy.cors - - name: envoy.router + - name: envoy.filters.http.grpc_web + - name: envoy.filters.http.cors + - name: envoy.filters.http.router clusters: - name: echo_service connect_timeout: 0.25s type: logical_dns http2_protocol_options: {} lb_policy: round_robin - hosts: [{ socket_address: { address: node-server, port_value: 9090 }}] + load_assignment: + cluster_name: cluster_0 + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: node-server + port_value: 9090 \ No newline at end of file diff --git a/net/grpc/gateway/examples/helloworld/envoy.yaml b/net/grpc/gateway/examples/helloworld/envoy.yaml index b7f43ca2..ea40f215 100644 --- a/net/grpc/gateway/examples/helloworld/envoy.yaml +++ b/net/grpc/gateway/examples/helloworld/envoy.yaml @@ -10,8 +10,9 @@ static_resources: socket_address: { address: 0.0.0.0, port_value: 8080 } filter_chains: - filters: - - name: envoy.http_connection_manager - config: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager codec_type: auto stat_prefix: ingress_http route_config: @@ -32,9 +33,9 @@ static_resources: max_age: "1728000" expose_headers: custom-header-1,grpc-status,grpc-message http_filters: - - name: envoy.grpc_web - - name: envoy.cors - - name: envoy.router + - name: envoy.filters.http.grpc_web + - name: envoy.filters.http.cors + - name: envoy.filters.http.router clusters: - name: greeter_service connect_timeout: 0.25s @@ -42,4 +43,12 @@ static_resources: http2_protocol_options: {} lb_policy: round_robin # win/mac hosts: Use address: host.docker.internal instead of address: localhost in the line below - hosts: [{ socket_address: { address: 0.0.0.0, port_value: 9090 }}] + load_assignment: + cluster_name: cluster_0 + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 0.0.0.0 + port_value: 9090 \ No newline at end of file diff --git a/test/interop/envoy.yaml b/test/interop/envoy.yaml index c53e6332..4b14a55a 100644 --- a/test/interop/envoy.yaml +++ b/test/interop/envoy.yaml @@ -10,8 +10,9 @@ static_resources: socket_address: { address: 0.0.0.0, port_value: 8080 } filter_chains: - filters: - - name: envoy.http_connection_manager - config: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager codec_type: auto stat_prefix: ingress_http route_config: @@ -32,13 +33,21 @@ static_resources: max_age: "1728000" expose_headers: x-grpc-test-echo-initial,x-grpc-test-echo-trailing-bin,grpc-status,grpc-message http_filters: - - name: envoy.grpc_web - - name: envoy.cors - - name: envoy.router + - name: envoy.filters.http.grpc_web + - name: envoy.filters.http.cors + - name: envoy.filters.http.router clusters: - name: interop_service connect_timeout: 0.25s type: logical_dns http2_protocol_options: {} lb_policy: round_robin - hosts: [{ socket_address: { address: localhost, port_value: 7074 }}] + load_assignment: + cluster_name: cluster_0 + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: localhost + port_value: 7074 \ No newline at end of file