Skip to content

Commit

Permalink
feat: Add direct route in the local gateway proxy bootstrap config (#…
Browse files Browse the repository at this point in the history
…8409)

* feat: Add direct route in the local gateway proxy bootstrap config

* Add documentation

* Change changelog type to NON_USER_FACING

Co-authored-by: Nathan Fudenberg <[email protected]>

* explicitly add resolvesIssue in the changelog

* Update local-gateway-proxy readme to be more readable

---------

Co-authored-by: David Jumani <[email protected]>
Co-authored-by: Nathan Fudenberg <[email protected]>
Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Jun 22, 2023
1 parent b59a507 commit 5178ca2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
changelog:
- type: NON_USER_FACING
issueLink: https://github.com/solo-io/solo-projects/issues/5112
resolvesIssue: true
description: >-
Adds a new direct route to the local gatway proxy bootstrap config.
9 changes: 8 additions & 1 deletion install/local-gateway-proxy/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Local Gateway-Proxy
It can be useful to run the Envoy proxy, without the control-plane, as a way of validating proxy behavior.

The envoy proxy is configured to perform the following :
- Define a listener on port 8000.
- Define a cluster `echo_service` mapped to `postman-echo.com` as the upstream endpoint.
- Define an `http_connection_manager` filter with a router that does the following :
- Define a `direct_response` filter for the `/direct` path that returns a status 200 along with `direct response, ok` as the response body
- Route all other requests to the `echo_service`

## Setup
[source_data/bootstrap.yaml](./source_data/bootstrap.yaml) provides example bootstrap that can be used. To run this locally, first execute:
```shell
Expand Down Expand Up @@ -28,4 +35,4 @@ If the above command succeeded, you should be able to visit [port 19000 in your
To clean up the running instance, run:
```shell
docker-compose down
```
```
8 changes: 7 additions & 1 deletion install/local-gateway-proxy/source_data/bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ static_resources:
- name: local_service
domains: ["*"]
routes:
# https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/network_filters/direct_response_filter.html
- match: { path: "/direct" }
direct_response:
status: 200
body:
inline_string: "direct response, ok"
- match: { prefix: "/" }
route:
cluster: echo_service
Expand Down Expand Up @@ -118,4 +124,4 @@ static_resources:
# Definition for how Envoy will receive its dynamic configuration
# https://www.envoyproxy.io/docs/envoy/latest/api-docs/xds_protocol#xds-protocol
####
dynamic_resources: {}
dynamic_resources: {}

0 comments on commit 5178ca2

Please sign in to comment.