Last active
May 12, 2019 06:11
-
-
Save michaelfung/e701f0066d793c1dad05327a432279d9 to your computer and use it in GitHub Desktop.
Envoy sample configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static_resources: | |
listeners: | |
- address: | |
socket_address: | |
address: 10.1.1.8 | |
port_value: 443 | |
filter_chains: | |
- filters: | |
- name: envoy.http_connection_manager | |
config: | |
use_remote_address: true | |
access_log: | |
- name: envoy.file_access_log | |
filter: | |
not_health_check_filter: {} | |
config: | |
path: "/var/log/envoy/access.log" | |
codec_type: auto | |
stat_prefix: ingress_http | |
idle_timeout: 90s | |
route_config: | |
name: local_route | |
virtual_hosts: | |
- name: hu_main_api | |
domains: | |
- "*" | |
routes: | |
- match: | |
prefix: "/guest/login" | |
route: | |
cluster: authen_api | |
use_websocket: false | |
- match: | |
prefix: "/oauth2/aog" | |
route: | |
cluster: oauth_api | |
use_websocket: false | |
- match: | |
prefix: "/oauth2/ifttt/v1" | |
route: | |
cluster: oauth_api | |
use_websocket: false | |
- match: | |
prefix: "/oauth2/alexa/v1" | |
route: | |
cluster: oauth_api | |
use_websocket: false | |
- match: | |
prefix: "/oauth2/ash/v1" | |
route: | |
cluster: oauth_api | |
use_websocket: false | |
- match: | |
prefix: "/aog/v1/smarthome" | |
route: | |
cluster: aog_api | |
use_websocket: false | |
- match: | |
prefix: "/" | |
route: | |
cluster: hu_main_api | |
#idle_timeout: 60s | |
use_websocket: true | |
websocket_config: | |
stat_prefix: "websocket" | |
idle_timeout: 120s | |
max_connect_attempts: 3 | |
http_filters: | |
- name: envoy.gzip | |
config: | |
remove_accept_encoding_header: true | |
- name: envoy.router | |
config: {} | |
tls_context: | |
common_tls_context: | |
tls_certificates: | |
certificate_chain: | |
filename: "/etc/envoy/api-1.crt" | |
private_key: | |
filename: "/etc/envoy/api-1.key" | |
clusters: | |
- name: hu_main_api | |
connect_timeout: 0.25s | |
type: strict_dns | |
protocol_selection: 1 | |
common_http_protocol_options: | |
idle_timeout: 10s | |
lb_policy: round_robin | |
hosts: | |
- socket_address: | |
address: 127.0.0.1 | |
port_value: 3000 | |
- name: authen_api | |
connect_timeout: 2.5s | |
type: strict_dns | |
protocol_selection: 1 | |
lb_policy: round_robin | |
hosts: | |
- socket_address: | |
address: 127.0.0.1 | |
port_value: 8103 | |
- name: oauth_api | |
connect_timeout: 2.5s | |
type: strict_dns | |
protocol_selection: 1 | |
lb_policy: round_robin | |
hosts: | |
- socket_address: | |
address: 127.0.0.1 | |
port_value: 8101 | |
- name: aog_api | |
connect_timeout: 2.5s | |
type: strict_dns | |
protocol_selection: 1 | |
lb_policy: round_robin | |
hosts: | |
- socket_address: | |
address: 10.1.1.16 | |
port_value: 8102 | |
admin: | |
access_log_path: "/dev/null" | |
address: | |
socket_address: | |
address: 0.0.0.0 | |
port_value: 9901 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment