Skip to content

Instantly share code, notes, and snippets.

@iNoahNothing
Last active December 20, 2018 18:59
Show Gist options
  • Save iNoahNothing/f9980d9a19d5b510b1e3e8bbeb75d1b9 to your computer and use it in GitHub Desktop.
Save iNoahNothing/f9980d9a19d5b510b1e3e8bbeb75d1b9 to your computer and use it in GitHub Desktop.
{
"@type": "/envoy.config.bootstrap.v2.Bootstrap",
"static_resources": {
"clusters": [
{
"connect_timeout": "3s",
"lb_policy": "ROUND_ROBIN",
"load_assignment": {
"cluster_name": "cluster_127_0_0_1_8877",
"endpoints": [
{
"lb_endpoints": [
{
"endpoint": {
"address": {
"socket_address": {
"address": "127.0.0.1",
"port_value": 8877,
"protocol": "TCP"
}
}
}
}
]
}
]
},
"name": "cluster_127_0_0_1_8877",
"type": "STRICT_DNS"
},
{
"connect_timeout": "3s",
"lb_policy": "ROUND_ROBIN",
"load_assignment": {
"cluster_name": "cluster_echo_websocket_org",
"endpoints": [
{
"lb_endpoints": [
{
"endpoint": {
"address": {
"socket_address": {
"address": "echo.websocket.org",
"port_value": 80,
"protocol": "TCP"
}
}
}
}
]
}
]
},
"name": "cluster_echo_websocket_org",
"type": "STRICT_DNS"
},
{
"connect_timeout": "3s",
"lb_policy": "ROUND_ROBIN",
"load_assignment": {
"cluster_name": "cluster_qotm",
"endpoints": [
{
"lb_endpoints": [
{
"endpoint": {
"address": {
"socket_address": {
"address": "qotm",
"port_value": 80,
"protocol": "TCP"
}
}
}
}
]
}
]
},
"name": "cluster_qotm",
"type": "STRICT_DNS"
},
{
"connect_timeout": "3s",
"lb_policy": "ROUND_ROBIN",
"load_assignment": {
"cluster_name": "cluster_ws_sync_80",
"endpoints": [
{
"lb_endpoints": [
{
"endpoint": {
"address": {
"socket_address": {
"address": "ws-sync",
"port_value": 80,
"protocol": "TCP"
}
}
}
}
]
}
]
},
"name": "cluster_ws_sync_80",
"type": "STRICT_DNS"
}
],
"listeners": [
{
"address": {
"socket_address": {
"address": "0.0.0.0",
"port_value": 443,
"protocol": "TCP"
}
},
"filter_chains": [
{
"filters": [
{
"config": {
"access_log": [
{
"config": {
"format": "ACCESS [%START_TIME%] \"%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%\" %RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% \"%REQ(X-FORWARDED-FOR)%\" \"%REQ(USER-AGENT)%\" \"%REQ(X-REQUEST-ID)%\" \"%REQ(:AUTHORITY)%\" \"%UPSTREAM_HOST%\"\n",
"path": "/dev/fd/1"
},
"name": "envoy.file_access_log"
}
],
"http_filters": [
{
"name": "envoy.cors"
},
{
"name": "envoy.router"
}
],
"route_config": {
"virtual_hosts": [
{
"domains": [
"*"
],
"name": "backend",
"routes": [
{
"match": {
"case_sensitive": true,
"prefix": "/ambassador/v0/check_ready"
},
"route": {
"prefix_rewrite": "/ambassador/v0/check_ready",
"priority": null,
"timeout": "3.000s",
"weighted_clusters": {
"clusters": [
{
"name": "cluster_127_0_0_1_8877",
"weight": 100.0
}
]
}
}
},
{
"match": {
"case_sensitive": true,
"prefix": "/ambassador/v0/check_alive"
},
"route": {
"prefix_rewrite": "/ambassador/v0/check_alive",
"priority": null,
"timeout": "3.000s",
"weighted_clusters": {
"clusters": [
{
"name": "cluster_127_0_0_1_8877",
"weight": 100.0
}
]
}
}
},
{
"match": {
"case_sensitive": true,
"prefix": "/ambassador/v0/"
},
"route": {
"prefix_rewrite": "/ambassador/v0/",
"priority": null,
"timeout": "3.000s",
"weighted_clusters": {
"clusters": [
{
"name": "cluster_127_0_0_1_8877",
"weight": 100.0
}
]
}
}
},
{
"match": {
"case_sensitive": true,
"prefix": "/ws_sync/"
},
"route": {
"prefix_rewrite": "/",
"priority": null,
"timeout": "3.000s",
"weighted_clusters": {
"clusters": [
{
"name": "cluster_ws_sync_80",
"weight": 100.0
}
]
}
}
},
{
"match": {
"case_sensitive": true,
"prefix": "/qotm/"
},
"route": {
"prefix_rewrite": "/",
"priority": null,
"timeout": "3.000s",
"weighted_clusters": {
"clusters": [
{
"name": "cluster_qotm",
"weight": 100.0
}
]
}
}
},
{
"match": {
"case_sensitive": true,
"prefix": "/echo/"
},
"route": {
"host_rewrite": "echo.websocket.org",
"prefix_rewrite": "/",
"priority": null,
"timeout": "3.000s",
"weighted_clusters": {
"clusters": [
{
"name": "cluster_echo_websocket_org",
"weight": 100.0
}
]
}
}
}
]
}
]
},
"stat_prefix": "ingress_http",
"upgrade_configs": [
{
"upgrade_type": "websocket"
}
],
"use_remote_address": true
},
"name": "envoy.http_connection_manager"
}
]
}
],
"name": "ir.listener"
},
{
"address": {
"socket_address": {
"address": "0.0.0.0",
"port_value": 80,
"protocol": "TCP"
}
},
"filter_chains": [
{
"filters": [
{
"config": {
"access_log": null,
"http_filters": [
{
"name": "envoy.router"
}
],
"route_config": {
"virtual_hosts": [
{
"domains": [
"*"
],
"name": "backend",
"require_tls": "ALL",
"routes": [
{
"match": {
"prefix": "/"
},
"redirect": {
"https_redirect": true,
"path_redirect": "/"
}
}
]
}
]
},
"stat_prefix": "ingress_http",
"use_remote_address": true
},
"name": "envoy.http_connection_manager"
}
]
}
],
"name": "redirect_listener"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment