| # https://www.envoyproxy.io/docs/envoy/latest/configuration/overview/examples |
| static_resources: |
| listeners: |
| - name: listener_0 |
| address: |
| socket_address: |
| address: 0.0.0.0 |
| port_value: 8080 |
| 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_all |
| access_log: |
| - filter: |
| not_health_check_filter: {} |
| name: envoy.access_loggers.file |
| typed_config: |
| '@type': type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog |
| log_format: |
| json_format: |
| fields: |
| requestId: '%REQ(X-REQUEST-ID)%' |
| httpRequest: |
| protocol: '%PROTOCOL%' |
| remoteIp: '%DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%' |
| requestMethod: '%REQ(:METHOD)%' |
| requestSize: '%BYTES_RECEIVED%' |
| requestUrl: https://%REQ(:AUTHORITY)%%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% |
| responseSize: '%BYTES_SENT%' |
| serverIp: '%UPSTREAM_HOST%' |
| status: '%RESPONSE_CODE%' |
| userAgent: '%REQ(USER-AGENT)%' |
| latencyMs: '%DURATION%' |
| responseFlags: '%RESPONSE_FLAGS%' |
| time: '%START_TIME%' |
| path: /dev/stdout |
| http_filters: |
| - name: envoy.filters.http.router |
| typed_config: |
| "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router |
| route_config: |
| name: ingress_all_routes |
| virtual_hosts: |
| - name: local_service |
| domains: ["*"] |
| routes: |
| - match: |
| prefix: "/" |
| grpc: {} |
| route: |
| cluster: grpc-service # route all grpc traffic to grpc-service cluster. |
| timeout: 0 # Do not time out. |
| idle_timeout: 0 # Do not time out. |
| - match: |
| prefix: "/" |
| route: |
| cluster: http-service # route the rest traffic to http-service cluster. |
| timeout: 0 # Do not time out. |
| idle_timeout: 0 # Do not time out. |
| clusters: |
| - name: http-service |
| type: STATIC |
| lb_policy: ROUND_ROBIN |
| circuit_breakers: |
| thresholds: |
| - max_connections: 100000 |
| max_pending_requests: 100000 |
| max_requests: 100000 |
| max_retries: 1000 |
| priority: DEFAULT |
| - max_connections: 100000 |
| max_pending_requests: 100000 |
| max_requests: 100000 |
| max_retries: 1000 |
| priority: HIGH |
| typed_extension_protocol_options: |
| envoy.extensions.upstreams.http.v3.HttpProtocolOptions: |
| "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions |
| explicit_http_config: |
| http_protocol_options: {} |
| load_assignment: |
| cluster_name: http-service |
| endpoints: |
| - lb_endpoints: |
| - endpoint: |
| address: |
| socket_address: |
| address: 127.0.0.1 |
| port_value: 8081 |
| - name: grpc-service |
| type: STATIC |
| lb_policy: ROUND_ROBIN |
| circuit_breakers: |
| thresholds: |
| - max_connections: 100000 |
| max_pending_requests: 100000 |
| max_requests: 100000 |
| max_retries: 1000 |
| priority: DEFAULT |
| - max_connections: 100000 |
| max_pending_requests: 100000 |
| max_requests: 100000 |
| max_retries: 1000 |
| priority: HIGH |
| 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: {} |
| load_assignment: |
| cluster_name: grpc-service |
| endpoints: |
| - lb_endpoints: |
| - endpoint: |
| address: |
| socket_address: |
| address: 127.0.0.1 |
| port_value: 8082 |