Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating documentation to use Envoy API v3. #586

Merged
merged 1 commit into from
Dec 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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