Skip to content

Commit

Permalink
configs: Fix default config
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <ryan@synca.io>
  • Loading branch information
phlax committed Sep 5, 2021
1 parent 3e52b0b commit 37620fa
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 55 deletions.
78 changes: 50 additions & 28 deletions configs/envoy-demo.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,79 @@
admin:
address:
socket_address:
protocol: TCP
address: 0.0.0.0
port_value: 9901
static_resources:
listeners:
- name: listener_0
address:
socket_address:
protocol: TCP
address: 0.0.0.0
port_value: 10000
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
codec_type: AUTO
stat_prefix: ingress_http
access_log:
- name: envoy.access_loggers.stdout
typed_config:
"@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog
route_config:
name: local_route
name: proxy
virtual_hosts:
- name: local_service
domains: ["*"]
- name: app
domains:
- "*"
routes:
- match:
prefix: "/"
route:
host_rewrite_literal: www.envoyproxy.io
cluster: service_envoyproxy_io
cluster: loopback
http_filters:
- name: envoy.filters.http.router

- name: listener_1
address:
socket_address:
protocol: TCP
address: 127.0.0.1
port_value: 10001
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
codec_type: AUTO
stat_prefix: loopback_http
local_reply_config:
mappers:
- filter:
header_filter:
header:
name: ":method"
exact_match: "GET"
body_format_override:
text_format_source:
inline_string: |
<html>
<body>
<h1>Welcome to Envoy</h1>
<h2>
check out the <a href='https://www.envoyproxy.io'>Envoy website</a>
and <a href='https://www.envoyproxy.io/docs'>documentation</a>
</h2>
</body>
</html>
content_type: "text/html; charset=UTF-8"
route_config:
name: local_route
http_filters:
- name: envoy.filters.http.router

clusters:
- name: service_envoyproxy_io
type: LOGICAL_DNS
# Comment out the following line to test on v6 networks
dns_lookup_family: V4_ONLY
- name: loopback
type: STATIC
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: service_envoyproxy_io
cluster_name: loopback
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: www.envoyproxy.io
port_value: 443
transport_socket:
name: envoy.transport_sockets.tls
typed_config:
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
sni: www.envoyproxy.io
address: 127.0.0.1
port_value: 10001
77 changes: 50 additions & 27 deletions configs/envoyproxy_io_proxy.yaml
Original file line number Diff line number Diff line change
@@ -1,56 +1,79 @@
admin:
address:
socket_address:
protocol: TCP
address: 0.0.0.0
port_value: 9901
static_resources:
listeners:
- name: listener_0
address:
socket_address:
protocol: TCP
address: 0.0.0.0
port_value: 10000
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
scheme_header_transformation:
scheme_to_overwrite: https
codec_type: AUTO
stat_prefix: ingress_http
route_config:
name: local_route
name: proxy
virtual_hosts:
- name: local_service
domains: ["*"]
- name: app
domains:
- "*"
routes:
- match:
prefix: "/"
route:
host_rewrite_literal: www.envoyproxy.io
cluster: service_envoyproxy_io
cluster: loopback
http_filters:
- name: envoy.filters.http.router

- name: listener_1
address:
socket_address:
protocol: TCP
address: 127.0.0.1
port_value: 10001
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
codec_type: AUTO
stat_prefix: loopback_http
local_reply_config:
mappers:
- filter:
header_filter:
header:
name: ":method"
exact_match: "GET"
body_format_override:
text_format_source:
inline_string: |
<html>
<body>
<h1>Welcome to Envoy</h1>
<h2>
check out the <a href='https://www.envoyproxy.io'>Envoy website</a>
and <a href='https://www.envoyproxy.io/docs'>documentation</a>
</h2>
</body>
</html>
content_type: "text/html; charset=UTF-8"
route_config:
name: local_route
http_filters:
- name: envoy.filters.http.router

clusters:
- name: service_envoyproxy_io
connect_timeout: 30s
type: LOGICAL_DNS
# Comment out the following line to test on v6 networks
dns_lookup_family: V4_ONLY
- name: loopback
type: STATIC
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: service_envoyproxy_io
cluster_name: loopback
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: www.envoyproxy.io
port_value: 443
transport_socket:
name: envoy.transport_sockets.tls
typed_config:
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
sni: www.envoyproxy.io
address: 127.0.0.1
port_value: 10001

0 comments on commit 37620fa

Please sign in to comment.