Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions site/content/en/latest/boilerplates/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ Get the name of the Envoy service created the by the example Gateway:
export ENVOY_SERVICE=$(kubectl get svc -n envoy-gateway-system --selector=gateway.envoyproxy.io/owning-gateway-namespace=default,gateway.envoyproxy.io/owning-gateway-name=eg -o jsonpath='{.items[0].metadata.name}')
```

Get the deployment of the Envoy service created the by the example Gateway:

```shell
export ENVOY_DEPLOYMENT=$(kubectl get deploy -n envoy-gateway-system --selector=gateway.envoyproxy.io/owning-gateway-namespace=default,gateway.envoyproxy.io/owning-gateway-name=eg -o jsonpath='{.items[0].metadata.name}')
```

Port forward to the Envoy service:

```shell
Expand Down
17 changes: 13 additions & 4 deletions site/content/en/latest/tasks/traffic/client-traffic-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,16 +406,25 @@ Curl the admin interface port to fetch the configured value for `xff_num_trusted

```shell
curl -s 'http://localhost:19000/config_dump?resource=dynamic_listeners' \
| jq -r '.configs[0].active_state.listener.default_filter_chain.filters[0].typed_config
| with_entries(select(.key | match("xff|remote_address|original_ip")))'
| jq -r '.configs[1].active_state.listener.default_filter_chain.filters[0].typed_config
| {use_remote_address, original_ip_detection_extensions}'
```

You should expect to see the following:

```json
{
"use_remote_address": true,
"xff_num_trusted_hops": 2
"use_remote_address": false,
"original_ip_detection_extensions": [
{
"name": "envoy.extensions.http.original_ip_detection.xff",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.http.original_ip_detection.xff.v3.XffConfig",
"xff_num_trusted_hops": 1,
"skip_xff_append": false
}
}
]
}
```

Expand Down
6 changes: 6 additions & 0 deletions site/content/en/v1.4/boilerplates/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ Get the name of the Envoy service created the by the example Gateway:
export ENVOY_SERVICE=$(kubectl get svc -n envoy-gateway-system --selector=gateway.envoyproxy.io/owning-gateway-namespace=default,gateway.envoyproxy.io/owning-gateway-name=eg -o jsonpath='{.items[0].metadata.name}')
```

Get the deployment of the Envoy service created the by the example Gateway:

```shell
export ENVOY_DEPLOYMENT=$(kubectl get deploy -n envoy-gateway-system --selector=gateway.envoyproxy.io/owning-gateway-namespace=default,gateway.envoyproxy.io/owning-gateway-name=eg -o jsonpath='{.items[0].metadata.name}')
```

Port forward to the Envoy service:

```shell
Expand Down
17 changes: 13 additions & 4 deletions site/content/en/v1.4/tasks/traffic/client-traffic-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,16 +406,25 @@ Curl the admin interface port to fetch the configured value for `xff_num_trusted

```shell
curl -s 'http://localhost:19000/config_dump?resource=dynamic_listeners' \
| jq -r '.configs[0].active_state.listener.default_filter_chain.filters[0].typed_config
| with_entries(select(.key | match("xff|remote_address|original_ip")))'
| jq -r '.configs[1].active_state.listener.default_filter_chain.filters[0].typed_config
| {use_remote_address, original_ip_detection_extensions}'
```

You should expect to see the following:

```json
{
"use_remote_address": true,
"xff_num_trusted_hops": 2
"use_remote_address": false,
"original_ip_detection_extensions": [
{
"name": "envoy.extensions.http.original_ip_detection.xff",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.http.original_ip_detection.xff.v3.XffConfig",
"xff_num_trusted_hops": 1,
"skip_xff_append": false
}
}
]
}
```

Expand Down
Loading