| # Copyright 2020 The Chromium OS Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| # This is the local development configuration based on ../dockerfiles/envoy/envoy.yaml | |
| # The main difference is that the cluster addresses are set to localhost and the ports are | |
| # set to the ports that are exposed by the docker containers. | |
| admin: | |
| access_log_path: /tmp/admin_access.log | |
| address: | |
| socket_address: | |
| address: 0.0.0.0 | |
| port_value: 6011 | |
| static_resources: | |
| listeners: | |
| - name: listener_0 | |
| address: | |
| socket_address: | |
| address: 0.0.0.0 | |
| port_value: 6001 | |
| filter_chains: | |
| - filters: | |
| - 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 | |
| stream_idle_timeout: 86400s | |
| stat_prefix: ingress_http | |
| access_log: | |
| - name: envoy.file_access_log | |
| typed_config: | |
| "@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog | |
| path: "/tmp/envoy_access.log" | |
| upgrade_configs: | |
| - upgrade_type: websocket | |
| route_config: | |
| name: local_route | |
| virtual_hosts: | |
| - name: backend | |
| domains: ["*"] | |
| routes: | |
| - match: | |
| prefix: "/rpc/" | |
| route: | |
| cluster: backend_grpc_service | |
| max_grpc_timeout: 0s | |
| prefix_rewrite: "/" | |
| - match: | |
| prefix: "/" | |
| route: | |
| cluster: ui_service | |
| cors: | |
| allow_origin_string_match: | |
| - prefix: "*" | |
| allow_methods: GET, PUT, DELETE, POST, OPTIONS | |
| allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout | |
| max_age: "1728000" | |
| expose_headers: custom-header-1,grpc-status,grpc-message | |
| http_filters: | |
| - name: envoy.filters.http.grpc_web | |
| - name: envoy.filters.http.cors | |
| - name: envoy.filters.http.router | |
| clusters: | |
| - name: backend_grpc_service | |
| connect_timeout: 0.25s | |
| type: STRICT_DNS | |
| http2_protocol_options: {} | |
| lb_policy: round_robin | |
| load_assignment: | |
| cluster_name: backend_grpc_service | |
| endpoints: | |
| - lb_endpoints: | |
| - endpoint: | |
| address: | |
| socket_address: | |
| address: localhost | |
| port_value: 6003 | |
| - name: ui_service | |
| connect_timeout: 1s | |
| type: STRICT_DNS | |
| lb_policy: round_robin | |
| load_assignment: | |
| cluster_name: ui_service | |
| endpoints: | |
| - lb_endpoints: | |
| - endpoint: | |
| address: | |
| socket_address: | |
| address: localhost | |
| port_value: 4200 |