Skip to content

Commit

Permalink
Updating documentation to use Envoy API v3. (#586)
Browse files Browse the repository at this point in the history
Verified that an Envoy built after `588d9344b31e6544869547c4bcd359b3b0f1d4cf` can load the configuration from the documents.

Also:
- fixing one typo in the documentation.
- cosmetic changes of enum values to uppercase form.

Works on #580

Signed-off-by: Jakub Sobon <[email protected]>
  • Loading branch information
mum4k authored Dec 8, 2020
1 parent a4260dc commit 90af260
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions source/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ static_resources:
port_value: 10000
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
generate_request_id: false
codec_type: auto
codec_type: AUTO
stat_prefix: ingress_http
route_config:
name: local_route
Expand All @@ -47,10 +48,12 @@ static_resources:
- "*"
http_filters:
- name: dynamic-delay
config:
typed_config:
"@type": type.googleapis.com/nighthawk.server.ResponseOptions
static_delay: 0.5s
- name: test-server # before envoy.router because order matters!
config:
typed_config:
"@type": type.googleapis.com/nighthawk.server.ResponseOptions
response_body_size: 10
response_headers:
- { header: { key: "foo", value: "bar" } }
Expand All @@ -59,8 +62,9 @@ static_resources:
append: true,
}
- { header: { key: "x-nh", value: "1" } }
- name: envoy.router
config:
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
dynamic_stats: false
admin:
access_log_path: /tmp/envoy.log
Expand Down Expand Up @@ -146,7 +150,7 @@ same time.

```
# If you already have Envoy running, you might need to set --base-id to allow the test-server to start.
➜ /bazel-bin/nighthawk/source/server/server --config-path /path/to/test-server-server.yaml
➜ /bazel-bin/nighthawk/source/server/server --config-path /path/to/test-server.yaml

# Verify the test server with a curl command similar to:
➜ curl -H "x-nighthawk-test-server-config: {response_body_size:20, static_delay: \"0s\"}" -vv 127.0.0.1:10000
Expand Down

0 comments on commit 90af260

Please sign in to comment.