diff --git a/configs/freebind/freebind.yaml b/configs/freebind/freebind.yaml index 9b494bd05742f..1171795589250 100644 --- a/configs/freebind/freebind.yaml +++ b/configs/freebind/freebind.yaml @@ -1,18 +1,23 @@ admin: access_log_path: /tmp/admin_access.log address: - socket_address: { address: 127.0.0.1, port_value: 9901 } + socket_address: + address: 127.0.0.1 + port_value: 9901 static_resources: listeners: - name: listener_0 address: - socket_address: { address: 192.168.42.1, port_value: 10000 } + socket_address: + address: 192.168.42.1 + port_value: 10000 freebind: true filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager stat_prefix: ingress_http route_config: name: local_route @@ -29,10 +34,15 @@ static_resources: connect_timeout: 30s type: STATIC lb_policy: ROUND_ROBIN - hosts: - - socket_address: - address: 127.0.0.1 - port_value: 10001 + load_assignment: + cluster_name: service_local + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 10001 # TODO(htuch): Figure out how to do end-to-end testing with # outgoing connections and free bind. # upstream_bind_config: diff --git a/configs/google_com_proxy.v2.yaml b/configs/google_com_proxy.v2.yaml index b97092748b9ec..532ba06bf6c73 100644 --- a/configs/google_com_proxy.v2.yaml +++ b/configs/google_com_proxy.v2.yaml @@ -16,7 +16,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager stat_prefix: ingress_http route_config: name: local_route @@ -38,8 +39,14 @@ static_resources: # Comment out the following line to test on v6 networks dns_lookup_family: V4_ONLY lb_policy: ROUND_ROBIN - hosts: - - socket_address: - address: google.com - port_value: 443 - tls_context: { sni: www.google.com } + load_assignment: + cluster_name: service_google + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: www.google.com + port_value: 443 + tls_context: + sni: www.google.com diff --git a/configs/original-dst-cluster/proxy_config.yaml b/configs/original-dst-cluster/proxy_config.yaml index 19f770e7fa5fa..7f0515d61c10e 100644 --- a/configs/original-dst-cluster/proxy_config.yaml +++ b/configs/original-dst-cluster/proxy_config.yaml @@ -7,24 +7,27 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: - deprecated_v1: true - value: - stat_prefix: ingress_http - route_config: - virtual_hosts: - - routes: - - prefix: "/" - timeout_ms: 0 + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager + stat_prefix: ingress_http + route_config: + name: local_service + virtual_hosts: + - name: backend + domains: + - "*" + routes: + - match: + prefix: "/" + route: cluster: cluster1 - domains: - - "*" - name: local_service - filters: - - name: router - config: {} - codec_type: auto - use_original_dst: true + http_filters: + - name: envoy.router + typed_config: {} + codec_type: auto + listener_filters: + - name: envoy.listener.original_dst + typed_config: {} clusters: - name: cluster1 type: ORIGINAL_DST @@ -34,7 +37,7 @@ static_resources: cluster_manager: {} watchdog: {} admin: - access_log_path: "/tmp/admin_access.log" + access_log_path: /tmp/admin_access.log address: socket_address: address: 127.0.0.1 diff --git a/docs/root/configuration/health_checkers/redis.rst b/docs/root/configuration/health_checkers/redis.rst index 37af55665b53a..9cf820f9a9705 100644 --- a/docs/root/configuration/health_checkers/redis.rst +++ b/docs/root/configuration/health_checkers/redis.rst @@ -18,7 +18,8 @@ Redis health checker is shown below: custom_health_check: name: envoy.health_checkers.redis - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.redis_proxy.v2.RedisProxy key: foo * :ref:`v2 API reference ` \ No newline at end of file diff --git a/docs/root/configuration/http_filters/ext_authz_filter.rst b/docs/root/configuration/http_filters/ext_authz_filter.rst index 33578a30b48a0..d5dd4fcc3ee01 100644 --- a/docs/root/configuration/http_filters/ext_authz_filter.rst +++ b/docs/root/configuration/http_filters/ext_authz_filter.rst @@ -44,8 +44,15 @@ A sample filter configuration for a gRPC authorization server: - name: ext-authz type: static http2_protocol_options: {} - hosts: - - socket_address: { address: 127.0.0.1, port_value: 10003 } + load_assignment: + cluster_name: ext-authz + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 10003 # This timeout controls the initial TCP handshake timeout - not the timeout for the # entire request. @@ -72,8 +79,15 @@ A sample filter configuration for a raw HTTP authorization server: connect_timeout: 0.25s type: logical_dns lb_policy: round_robin - hosts: - - socket_address: { address: 127.0.0.1, port_value: 10003 } + load_assignment: + cluster_name: ext-authz + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 10003 Per-Route Configuration ----------------------- diff --git a/docs/root/configuration/http_filters/grpc_json_transcoder_filter.rst b/docs/root/configuration/http_filters/grpc_json_transcoder_filter.rst index 8a974319f7134..a694fc7170a75 100644 --- a/docs/root/configuration/http_filters/grpc_json_transcoder_filter.rst +++ b/docs/root/configuration/http_filters/grpc_json_transcoder_filter.rst @@ -106,7 +106,8 @@ gRPC or RESTful JSON requests to localhost:51051. filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager stat_prefix: grpc_json codec_type: AUTO route_config: @@ -136,7 +137,13 @@ gRPC or RESTful JSON requests to localhost:51051. lb_policy: round_robin dns_lookup_family: V4_ONLY http2_protocol_options: {} - hosts: - - socket_address: - address: docker.for.mac.localhost - port_value: 50051 + load_assignment: + cluster_name: grpc + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: docker.for.mac.localhost + port_value: 50051 + diff --git a/docs/root/configuration/http_filters/jwt_authn_filter.rst b/docs/root/configuration/http_filters/jwt_authn_filter.rst index 759eafbc68e13..878adea96a48d 100644 --- a/docs/root/configuration/http_filters/jwt_authn_filter.rst +++ b/docs/root/configuration/http_filters/jwt_authn_filter.rst @@ -80,10 +80,15 @@ Following cluster **example_jwks_cluster** is needed to fetch JWKS. cluster: name: example_jwks_cluster type: STRICT_DNS - hosts: - socket_address: - address: example.com - port_value: 80 + load_assignment: + cluster_name: example_jwks_cluster + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: example.com + port_value: 80 Inline JWKS config example diff --git a/docs/root/configuration/listener_filters/tls_inspector.rst b/docs/root/configuration/listener_filters/tls_inspector.rst index af949c0f10fef..0f3c3c655d617 100644 --- a/docs/root/configuration/listener_filters/tls_inspector.rst +++ b/docs/root/configuration/listener_filters/tls_inspector.rst @@ -27,7 +27,7 @@ A sample filter configuration could be: listener_filters: - name: "envoy.listener.tls_inspector" - config: {} + typed_config: {} Statistics ---------- diff --git a/docs/root/configuration/network_filters/ext_authz_filter.rst b/docs/root/configuration/network_filters/ext_authz_filter.rst index b6d1ab615ee5f..c0702ae02671e 100644 --- a/docs/root/configuration/network_filters/ext_authz_filter.rst +++ b/docs/root/configuration/network_filters/ext_authz_filter.rst @@ -42,8 +42,15 @@ A sample filter configuration could be: - name: ext-authz type: static http2_protocol_options: {} - hosts: - - socket_address: { address: 127.0.0.1, port_value: 10003 } + load_assignment: + cluster_name: ext-authz + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 10003 Statistics ---------- diff --git a/docs/root/configuration/network_filters/mysql_proxy_filter.rst b/docs/root/configuration/network_filters/mysql_proxy_filter.rst index 6d4731d4b00c0..5c76525156896 100644 --- a/docs/root/configuration/network_filters/mysql_proxy_filter.rst +++ b/docs/root/configuration/network_filters/mysql_proxy_filter.rst @@ -28,10 +28,12 @@ in the configuration snippet below: filter_chains: - filters: - name: envoy.filters.network.mysql_proxy - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.mysql_proxy.v1alpha1.MySQLProxy stat_prefix: mysql - name: envoy.tcp_proxy - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy stat_prefix: tcp cluster: ... @@ -88,10 +90,12 @@ _catalog_ table in the _productdb_ database. filter_chains: - filters: - name: envoy.filters.network.mysql_proxy - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.mysql_proxy.v1alpha1.MySQLProxy stat_prefix: mysql - name: envoy.filters.network.rbac - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.rbac.v2.RBAC stat_prefix: rbac rules: action: DENY @@ -110,6 +114,7 @@ _catalog_ table in the _productdb_ database. principals: - any: true - name: envoy.tcp_proxy - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy stat_prefix: tcp cluster: mysql diff --git a/docs/root/configuration/overview/v2_overview.rst b/docs/root/configuration/overview/v2_overview.rst index 722c7ae579212..560f6f130981d 100644 --- a/docs/root/configuration/overview/v2_overview.rst +++ b/docs/root/configuration/overview/v2_overview.rst @@ -75,7 +75,8 @@ A minimal fully static bootstrap config is provided below: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager stat_prefix: ingress_http codec_type: AUTO route_config: @@ -126,7 +127,8 @@ on 127.0.0.3:5678 is provided below: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager stat_prefix: ingress_http codec_type: AUTO route_config: @@ -253,7 +255,8 @@ The management server could respond to LDS requests with: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager stat_prefix: ingress_http codec_type: AUTO rds: diff --git a/docs/root/configuration/secret.rst b/docs/root/configuration/secret.rst index f9e27890eced6..2f6445260eb96 100644 --- a/docs/root/configuration/secret.rst +++ b/docs/root/configuration/secret.rst @@ -59,8 +59,8 @@ This example show how to configure secrets in the static_resource: E0:F3:C8:CE:5E:2E:A3:05:F0:70:1F:F5:12:E3:6E:2E:97:92:82:84:A2:28:BC:F7:73:32:D3:39:30:A1:B6:FD clusters: - connect_timeout: 0.25s - hosts: - - name: local_service_tls + load_assignment: + cluster_name: local_service_tls ... tls_context: common_tls_context: @@ -89,10 +89,15 @@ This example shows how to configure secrets fetched from remote SDS servers: clusters: - name: sds_server_mtls http2_protocol_options: {} - hosts: - socket_address: - address: 127.0.0.1 - port_value: 8234 + load_assignment: + cluster_name: sds_server_mtls + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 8234 tls_context: common_tls_context: - tls_certificate: @@ -102,13 +107,18 @@ This example shows how to configure secrets fetched from remote SDS servers: filename: certs/sds_key.pem - name: sds_server_uds http2_protocol_options: {} - hosts: - - pipe: - path: /tmp/uds_path + load_assignment: + cluster_name: sds_server_uds + endpoints: + - lb_endpoints: + - endpoint: + address: + pipe: + path: /tmp/uds_path - name: example_cluster connect_timeout: 0.25s - hosts: - - name: local_service_tls + load_assignment: + cluster_name: local_service_tls ... tls_context: common_tls_context: diff --git a/docs/root/faq/sni.rst b/docs/root/faq/sni.rst index cb36a587857c9..61ef2619db037 100644 --- a/docs/root/faq/sni.rst +++ b/docs/root/faq/sni.rst @@ -19,7 +19,7 @@ The following is a YAML example of the above requirement. socket_address: { address: 127.0.0.1, port_value: 1234 } listener_filters: - name: "envoy.listener.tls_inspector" - config: {} + typed_config: {} filter_chains: - filter_chain_match: server_names: ["example.com", "www.example.com"] @@ -30,7 +30,8 @@ The following is a YAML example of the above requirement. private_key: { filename: "example_com_key.pem" } filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager stat_prefix: ingress_http route_config: virtual_hosts: @@ -48,7 +49,8 @@ The following is a YAML example of the above requirement. private_key: { filename: "api_example_com_key.pem" } filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager stat_prefix: ingress_http route_config: virtual_hosts: diff --git a/docs/root/intro/arch_overview/ssl.rst b/docs/root/intro/arch_overview/ssl.rst index 3763ecf85b670..1586f050afa1f 100644 --- a/docs/root/intro/arch_overview/ssl.rst +++ b/docs/root/intro/arch_overview/ssl.rst @@ -86,7 +86,15 @@ Example configuration connect_timeout: 0.25s type: STATIC lb_policy: ROUND_ROBIN - hosts: [{ socket_address: { address: 127.0.0.2, port_value: 1234 }}] + load_assignment: + cluster_name: some_service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.2 + port_value: 1234 tls_context: common_tls_context: tls_certificates: diff --git a/docs/root/start/start.rst b/docs/root/start/start.rst index 9ba821c26b049..273c77269845c 100644 --- a/docs/root/start/start.rst +++ b/docs/root/start/start.rst @@ -68,7 +68,8 @@ The specification of the :ref:`listeners ` # Comment out the following line to test on v6 networks dns_lookup_family: V4_ONLY lb_policy: ROUND_ROBIN - hosts: [{ socket_address: { address: google.com, port_value: 443 }}] - tls_context: { sni: www.google.com } + load_assignment: + cluster_name: service_google + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: www.google.com + port_value: 443 + tls_context: + sni: www.google.com Using the Envoy Docker Image diff --git a/examples/cors/backend/front-envoy.yaml b/examples/cors/backend/front-envoy.yaml index 26f2a4cecf986..21b32df7ca452 100644 --- a/examples/cors/backend/front-envoy.yaml +++ b/examples/cors/backend/front-envoy.yaml @@ -7,12 +7,14 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager codec_type: auto stat_prefix: ingress_http access_log: - name: envoy.file_access_log - config: + typed_config: + "@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog path: "/var/log/access.log" route_config: name: local_route @@ -62,19 +64,24 @@ static_resources: cluster: backend_service http_filters: - name: envoy.cors - config: {} + typed_config: {} - name: envoy.router - config: {} + typed_config: {} clusters: - name: backend_service connect_timeout: 0.25s type: strict_dns lb_policy: round_robin http2_protocol_options: {} - hosts: - - socket_address: - address: backendservice - port_value: 80 + load_assignment: + cluster_name: backend_service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: backendservice + port_value: 80 admin: access_log_path: "/dev/null" address: diff --git a/examples/cors/backend/service-envoy.yaml b/examples/cors/backend/service-envoy.yaml index f358d2209f69c..f03491544e299 100644 --- a/examples/cors/backend/service-envoy.yaml +++ b/examples/cors/backend/service-envoy.yaml @@ -7,7 +7,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager codec_type: auto stat_prefix: ingress_http route_config: @@ -23,16 +24,21 @@ static_resources: cluster: local_service http_filters: - name: envoy.router - config: {} + typed_config: {} clusters: - name: local_service connect_timeout: 0.25s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: 127.0.0.1 - port_value: 8080 + load_assignment: + cluster_name: local_service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 8080 admin: access_log_path: "/dev/null" address: diff --git a/examples/cors/frontend/front-envoy.yaml b/examples/cors/frontend/front-envoy.yaml index 357809fbcadbc..c2379d5efcd97 100644 --- a/examples/cors/frontend/front-envoy.yaml +++ b/examples/cors/frontend/front-envoy.yaml @@ -7,12 +7,14 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager codec_type: auto stat_prefix: ingress_http access_log: - name: envoy.file_access_log - config: + typed_config: + "@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog path: "/var/log/access.log" route_config: name: local_route @@ -27,19 +29,24 @@ static_resources: cluster: frontend_service http_filters: - name: envoy.cors - config: {} + typed_config: {} - name: envoy.router - config: {} + typed_config: {} clusters: - name: frontend_service connect_timeout: 0.25s type: strict_dns lb_policy: round_robin http2_protocol_options: {} - hosts: - - socket_address: - address: frontendservice - port_value: 80 + load_assignment: + cluster_name: frontend_service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: frontendservice + port_value: 80 admin: access_log_path: "/dev/null" address: diff --git a/examples/cors/frontend/service-envoy.yaml b/examples/cors/frontend/service-envoy.yaml index f358d2209f69c..f03491544e299 100644 --- a/examples/cors/frontend/service-envoy.yaml +++ b/examples/cors/frontend/service-envoy.yaml @@ -7,7 +7,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager codec_type: auto stat_prefix: ingress_http route_config: @@ -23,16 +24,21 @@ static_resources: cluster: local_service http_filters: - name: envoy.router - config: {} + typed_config: {} clusters: - name: local_service connect_timeout: 0.25s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: 127.0.0.1 - port_value: 8080 + load_assignment: + cluster_name: local_service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 8080 admin: access_log_path: "/dev/null" address: diff --git a/examples/fault-injection/envoy.yaml b/examples/fault-injection/envoy.yaml index 13c943e64b970..3c42501078141 100644 --- a/examples/fault-injection/envoy.yaml +++ b/examples/fault-injection/envoy.yaml @@ -7,12 +7,14 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager codec_type: auto stat_prefix: ingress_http access_log: name: envoy.file_access_log - config: + typed_config: + "@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog path: /dev/stdout route_config: name: local_route @@ -27,14 +29,15 @@ static_resources: cluster: local_service http_filters: - name: envoy.fault - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.http.fault.v2.HTTPFault abort: http_status: 503 percentage: numerator: 0 denominator: HUNDRED - name: envoy.router - config: {} + typed_config: {} clusters: - name: local_service connect_timeout: 1s diff --git a/examples/front-proxy/front-envoy.yaml b/examples/front-proxy/front-envoy.yaml index d842cf3adc3b5..5bed8c8490176 100644 --- a/examples/front-proxy/front-envoy.yaml +++ b/examples/front-proxy/front-envoy.yaml @@ -7,7 +7,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager codec_type: auto stat_prefix: ingress_http route_config: @@ -27,26 +28,36 @@ static_resources: cluster: service2 http_filters: - name: envoy.router - config: {} + typed_config: {} clusters: - name: service1 connect_timeout: 0.25s type: strict_dns lb_policy: round_robin http2_protocol_options: {} - hosts: - - socket_address: - address: service1 - port_value: 80 + load_assignment: + cluster_name: service1 + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: service1 + port_value: 80 - name: service2 connect_timeout: 0.25s type: strict_dns lb_policy: round_robin http2_protocol_options: {} - hosts: - - socket_address: - address: service2 - port_value: 80 + load_assignment: + cluster_name: service2 + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: service2 + port_value: 80 admin: access_log_path: "/dev/null" address: diff --git a/examples/front-proxy/service-envoy.yaml b/examples/front-proxy/service-envoy.yaml index 4ae4562e5487c..90a466105b33b 100644 --- a/examples/front-proxy/service-envoy.yaml +++ b/examples/front-proxy/service-envoy.yaml @@ -7,7 +7,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager codec_type: auto stat_prefix: ingress_http route_config: @@ -23,16 +24,21 @@ static_resources: cluster: local_service http_filters: - name: envoy.router - config: {} + typed_config: {} clusters: - name: local_service connect_timeout: 0.25s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: 127.0.0.1 - port_value: 8080 + load_assignment: + cluster_name: local_service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 8080 admin: access_log_path: "/dev/null" address: diff --git a/examples/grpc-bridge/config/s2s-grpc-envoy.yaml b/examples/grpc-bridge/config/s2s-grpc-envoy.yaml index f4ca6ba29c53f..0f5e794739b83 100644 --- a/examples/grpc-bridge/config/s2s-grpc-envoy.yaml +++ b/examples/grpc-bridge/config/s2s-grpc-envoy.yaml @@ -7,7 +7,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager codec_type: auto stat_prefix: ingress_http route_config: @@ -24,17 +25,22 @@ static_resources: cluster: local_service_grpc http_filters: - name: envoy.router - config: {} + typed_config: {} clusters: - name: local_service_grpc connect_timeout: 0.250s type: static lb_policy: round_robin http2_protocol_options: {} - hosts: - - socket_address: - address: 127.0.0.1 - port_value: 8081 + load_assignment: + cluster_name: local_service_grpc + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 8081 admin: access_log_path: "/var/log/envoy/admin_access.log" address: diff --git a/examples/grpc-bridge/config/s2s-python-envoy.yaml b/examples/grpc-bridge/config/s2s-python-envoy.yaml index 1a0b18a3e68af..5538654f031a1 100644 --- a/examples/grpc-bridge/config/s2s-python-envoy.yaml +++ b/examples/grpc-bridge/config/s2s-python-envoy.yaml @@ -13,14 +13,16 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager codec_type: auto add_user_agent: true idle_timeout: 0.840s access_log: - name: envoy.file_access_log - config: - path: "/var/log/envoy/egress_http.log" + typed_config: + "@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog + path: "/var/log/envoy/admin_access.log" stat_prefix: egress_http use_remote_address: true route_config: @@ -36,9 +38,9 @@ static_resources: cluster: grpc http_filters: - name: envoy.grpc_http1_bridge - config: {} + typed_config: {} - name: envoy.router - config: {} + typed_config: {} clusters: - name: grpc type: logical_dns @@ -46,7 +48,12 @@ static_resources: lb_policy: round_robin connect_timeout: 0.250s http_protocol_options: {} - hosts: - - socket_address: - address: grpc - port_value: 9211 + load_assignment: + cluster_name: grpc + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: grpc + port_value: 9211 diff --git a/examples/jaeger-native-tracing/front-envoy-jaeger.yaml b/examples/jaeger-native-tracing/front-envoy-jaeger.yaml index 0643a38132dd4..c7794ba1026c8 100644 --- a/examples/jaeger-native-tracing/front-envoy-jaeger.yaml +++ b/examples/jaeger-native-tracing/front-envoy-jaeger.yaml @@ -7,7 +7,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager tracing: operation_name: egress codec_type: auto @@ -27,21 +28,27 @@ static_resources: operation: checkAvailability http_filters: - name: envoy.router - config: {} + typed_config: {} clusters: - name: service1 connect_timeout: 0.250s type: strict_dns lb_policy: round_robin http2_protocol_options: {} - hosts: - - socket_address: - address: service1 - port_value: 80 + load_assignment: + cluster_name: service1 + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: service1 + port_value: 80 tracing: http: name: envoy.dynamic.ot - config: + typed_config: + "@type": type.googleapis.com/envoy.config.trace.v2.DynamicOtConfig library: /usr/local/lib/libjaegertracing_plugin.so config: service_name: front-proxy diff --git a/examples/jaeger-native-tracing/service1-envoy-jaeger.yaml b/examples/jaeger-native-tracing/service1-envoy-jaeger.yaml index 2a18b588743e2..6c6ae595fbdb9 100644 --- a/examples/jaeger-native-tracing/service1-envoy-jaeger.yaml +++ b/examples/jaeger-native-tracing/service1-envoy-jaeger.yaml @@ -7,7 +7,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager tracing: operation_name: ingress codec_type: auto @@ -27,7 +28,7 @@ static_resources: operation: checkAvailability http_filters: - name: envoy.router - config: {} + typed_config: {} - address: socket_address: address: 0.0.0.0 @@ -35,7 +36,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager tracing: operation_name: egress codec_type: auto @@ -55,29 +57,40 @@ static_resources: operation: checkStock http_filters: - name: envoy.router - config: {} + typed_config: {} clusters: - name: local_service connect_timeout: 0.250s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: 127.0.0.1 - port_value: 8080 + load_assignment: + cluster_name: local_service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 8080 - name: service2 connect_timeout: 0.250s type: strict_dns lb_policy: round_robin http2_protocol_options: {} - hosts: - - socket_address: - address: service2 - port_value: 80 + load_assignment: + cluster_name: service2 + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: service2 + port_value: 80 tracing: http: name: envoy.dynamic.ot - config: + typed_config: + "@type": type.googleapis.com/envoy.config.trace.v2.DynamicOtConfig library: /usr/local/lib/libjaegertracing_plugin.so config: service_name: service1 diff --git a/examples/jaeger-native-tracing/service2-envoy-jaeger.yaml b/examples/jaeger-native-tracing/service2-envoy-jaeger.yaml index 895224cd1a284..dae9d8e555330 100644 --- a/examples/jaeger-native-tracing/service2-envoy-jaeger.yaml +++ b/examples/jaeger-native-tracing/service2-envoy-jaeger.yaml @@ -7,7 +7,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager tracing: operation_name: ingress codec_type: auto @@ -27,20 +28,26 @@ static_resources: operation: checkStock http_filters: - name: envoy.router - config: {} + typed_config: {} clusters: - name: local_service connect_timeout: 0.250s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: 127.0.0.1 - port_value: 8080 + load_assignment: + cluster_name: local_service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 8080 tracing: http: name: envoy.dynamic.ot - config: + typed_config: + "@type": type.googleapis.com/envoy.config.trace.v2.DynamicOtConfig library: /usr/local/lib/libjaegertracing_plugin.so config: service_name: service2 diff --git a/examples/jaeger-tracing/front-envoy-jaeger.yaml b/examples/jaeger-tracing/front-envoy-jaeger.yaml index dba34e4c5993c..287a8a4ef1160 100644 --- a/examples/jaeger-tracing/front-envoy-jaeger.yaml +++ b/examples/jaeger-tracing/front-envoy-jaeger.yaml @@ -7,7 +7,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager tracing: operation_name: egress codec_type: auto @@ -27,29 +28,40 @@ static_resources: operation: checkAvailability http_filters: - name: envoy.router - config: {} + typed_config: {} clusters: - name: service1 connect_timeout: 0.250s type: strict_dns lb_policy: round_robin http2_protocol_options: {} - hosts: - - socket_address: - address: service1 - port_value: 80 + load_assignment: + cluster_name: service1 + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: service1 + port_value: 80 - name: jaeger connect_timeout: 1s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: jaeger - port_value: 9411 + load_assignment: + cluster_name: jaeger + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: jaeger + port_value: 80 tracing: http: name: envoy.zipkin - config: + typed_config: + "@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig collector_cluster: jaeger collector_endpoint: "/api/v1/spans" shared_span_context: false diff --git a/examples/jaeger-tracing/service1-envoy-jaeger.yaml b/examples/jaeger-tracing/service1-envoy-jaeger.yaml index c9aa369341d19..7f06fe2da4417 100644 --- a/examples/jaeger-tracing/service1-envoy-jaeger.yaml +++ b/examples/jaeger-tracing/service1-envoy-jaeger.yaml @@ -7,7 +7,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager tracing: operation_name: ingress codec_type: auto @@ -27,7 +28,7 @@ static_resources: operation: checkAvailability http_filters: - name: envoy.router - config: {} + typed_config: {} - address: socket_address: address: 0.0.0.0 @@ -35,7 +36,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager tracing: operation_name: egress codec_type: auto @@ -55,37 +57,53 @@ static_resources: operation: checkStock http_filters: - name: envoy.router - config: {} + typed_config: {} clusters: - name: local_service connect_timeout: 0.250s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: 127.0.0.1 - port_value: 8080 + load_assignment: + cluster_name: local_service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 8080 - name: service2 connect_timeout: 0.250s type: strict_dns lb_policy: round_robin http2_protocol_options: {} - hosts: - - socket_address: - address: service2 - port_value: 80 + load_assignment: + cluster_name: service2 + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: service2 + port_value: 80 - name: jaeger connect_timeout: 1s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: jaeger - port_value: 9411 + load_assignment: + cluster_name: jaeger + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: jaeger + port_value: 9411 tracing: http: name: envoy.zipkin - config: + typed_config: + "@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig collector_cluster: jaeger collector_endpoint: "/api/v1/spans" shared_span_context: false diff --git a/examples/jaeger-tracing/service2-envoy-jaeger.yaml b/examples/jaeger-tracing/service2-envoy-jaeger.yaml index 6dbd16388c6cf..75a562ee41987 100644 --- a/examples/jaeger-tracing/service2-envoy-jaeger.yaml +++ b/examples/jaeger-tracing/service2-envoy-jaeger.yaml @@ -7,7 +7,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager tracing: operation_name: ingress codec_type: auto @@ -27,28 +28,39 @@ static_resources: operation: checkStock http_filters: - name: envoy.router - config: {} + typed_config: {} clusters: - name: local_service connect_timeout: 0.250s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: 127.0.0.1 - port_value: 8080 + load_assignment: + cluster_name: local_service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 8080 - name: jaeger connect_timeout: 1s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: jaeger - port_value: 9411 + load_assignment: + cluster_name: jaeger + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: jaeger + port_value: 9411 tracing: http: name: envoy.zipkin - config: + typed_config: + "@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig collector_cluster: jaeger collector_endpoint: "/api/v1/spans" shared_span_context: false diff --git a/examples/lua/envoy.yaml b/examples/lua/envoy.yaml index ccf85ca18fb14..aed6f977299b5 100644 --- a/examples/lua/envoy.yaml +++ b/examples/lua/envoy.yaml @@ -8,7 +8,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager stat_prefix: ingress_http codec_type: auto route_config: @@ -24,7 +25,8 @@ static_resources: cluster: web_service http_filters: - name: envoy.lua - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.http.lua.v2.Lua inline_code: | function envoy_on_request(request_handle) request_handle:headers():add("foo", "bar") @@ -34,17 +36,22 @@ static_resources: response_handle:headers():add("response-body-size", tostring(body_size)) end - name: envoy.router - config: {} + typed_config: {} clusters: - name: web_service connect_timeout: 0.25s type: strict_dns # static lb_policy: round_robin - hosts: - - socket_address: - address: web_service - port_value: 80 + load_assignment: + cluster_name: web_service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: web_service + port_value: 80 admin: access_log_path: "/dev/null" address: diff --git a/examples/redis/envoy.yaml b/examples/redis/envoy.yaml index 19cc48a811417..bdf76fefe434f 100644 --- a/examples/redis/envoy.yaml +++ b/examples/redis/envoy.yaml @@ -8,7 +8,8 @@ static_resources: filter_chains: - filters: - name: envoy.redis_proxy - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.redis_proxy.v2.RedisProxy stat_prefix: egress_redis cluster: redis_cluster settings: @@ -18,10 +19,15 @@ static_resources: connect_timeout: 1s type: strict_dns # static lb_policy: MAGLEV - hosts: - - socket_address: - address: redis_server - port_value: 6379 + load_assignment: + cluster_name: redis_cluster + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: redis_server + port_value: 6379 admin: access_log_path: "/dev/null" address: diff --git a/examples/zipkin-tracing/front-envoy-zipkin.yaml b/examples/zipkin-tracing/front-envoy-zipkin.yaml index e4e5a9cfb7fb4..c5ae662492fad 100644 --- a/examples/zipkin-tracing/front-envoy-zipkin.yaml +++ b/examples/zipkin-tracing/front-envoy-zipkin.yaml @@ -7,7 +7,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager generate_request_id: true tracing: operation_name: egress @@ -28,29 +29,40 @@ static_resources: operation: checkAvailability http_filters: - name: envoy.router - config: {} + typed_config: {} clusters: - name: service1 connect_timeout: 0.250s type: strict_dns lb_policy: round_robin http2_protocol_options: {} - hosts: - - socket_address: - address: service1 - port_value: 80 + load_assignment: + cluster_name: service1 + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: service1 + port_value: 80 - name: zipkin connect_timeout: 1s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: zipkin - port_value: 9411 + load_assignment: + cluster_name: zipkin + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: zipkin + port_value: 9411 tracing: http: name: envoy.zipkin - config: + typed_config: + "@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig collector_cluster: zipkin collector_endpoint: "/api/v1/spans" admin: diff --git a/examples/zipkin-tracing/service1-envoy-zipkin.yaml b/examples/zipkin-tracing/service1-envoy-zipkin.yaml index fbc9503c0a666..a8f7f3672b2bf 100644 --- a/examples/zipkin-tracing/service1-envoy-zipkin.yaml +++ b/examples/zipkin-tracing/service1-envoy-zipkin.yaml @@ -7,7 +7,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager tracing: operation_name: ingress codec_type: auto @@ -27,7 +28,7 @@ static_resources: operation: checkAvailability http_filters: - name: envoy.router - config: {} + typed_config: {} - address: socket_address: address: 0.0.0.0 @@ -35,7 +36,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager tracing: operation_name: egress codec_type: auto @@ -55,37 +57,53 @@ static_resources: operation: checkStock http_filters: - name: envoy.router - config: {} + typed_config: {} clusters: - name: local_service connect_timeout: 0.250s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: 127.0.0.1 - port_value: 8080 + load_assignment: + cluster_name: local_service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 8080 - name: service2 connect_timeout: 0.250s type: strict_dns lb_policy: round_robin http2_protocol_options: {} - hosts: - - socket_address: - address: service2 - port_value: 80 + load_assignment: + cluster_name: service2 + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: service2 + port_value: 80 - name: zipkin connect_timeout: 1s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: zipkin - port_value: 9411 + load_assignment: + cluster_name: zipkin + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: zipkin + port_value: 9411 tracing: http: name: envoy.zipkin - config: + typed_config: + "@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig collector_cluster: zipkin collector_endpoint: "/api/v1/spans" admin: diff --git a/examples/zipkin-tracing/service2-envoy-zipkin.yaml b/examples/zipkin-tracing/service2-envoy-zipkin.yaml index b17b3197014bf..fd4ed0c1a51cb 100644 --- a/examples/zipkin-tracing/service2-envoy-zipkin.yaml +++ b/examples/zipkin-tracing/service2-envoy-zipkin.yaml @@ -7,7 +7,8 @@ static_resources: filter_chains: - filters: - name: envoy.http_connection_manager - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager tracing: operation_name: ingress codec_type: auto @@ -27,28 +28,39 @@ static_resources: operation: checkStock http_filters: - name: envoy.router - config: {} + typed_config: {} clusters: - name: local_service connect_timeout: 0.250s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: 127.0.0.1 - port_value: 8080 + load_assignment: + cluster_name: local_service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 8080 - name: zipkin connect_timeout: 1s type: strict_dns lb_policy: round_robin - hosts: - - socket_address: - address: zipkin - port_value: 9411 + load_assignment: + cluster_name: zipkin + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: zipkin + port_value: 9411 tracing: http: name: envoy.zipkin - config: + typed_config: + "@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig collector_cluster: zipkin collector_endpoint: "/api/v1/spans" admin: diff --git a/test/extensions/filters/network/mysql_proxy/mysql_test_config.yaml b/test/extensions/filters/network/mysql_proxy/mysql_test_config.yaml index 48095d832b514..eb84aa942dfd9 100644 --- a/test/extensions/filters/network/mysql_proxy/mysql_test_config.yaml +++ b/test/extensions/filters/network/mysql_proxy/mysql_test_config.yaml @@ -7,12 +7,16 @@ admin: static_resources: clusters: name: cluster_0 - connect_timeout: - 2s - hosts: - socket_address: - address: 127.0.0.1 - port_value: 0 + connect_timeout: 2s + load_assignment: + cluster_name: cluster_0 + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 0 listeners: name: listener_0 address: @@ -22,9 +26,11 @@ static_resources: filter_chains: - filters: - name: envoy.filters.network.mysql_proxy - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.mysql_proxy.v1alpha1.MySQLProxy stat_prefix: mysql_stats - name: envoy.tcp_proxy - config: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy stat_prefix: tcp_stats cluster: cluster_0