Skip to content
Open
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
23 changes: 13 additions & 10 deletions docs/application-layer/rate-limiting.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This `EnvoyFilter` resource injects a local rate-limit filter into the `httpbin`
- A request with the header `quota: medium` will be limited to **3 requests per 300 seconds**.
- Other requests will be subject to a default limit of **10 requests per 300 seconds**.

The `workloadSelector` ensures that this filter is applied only to the `httpbin-waypoint` proxy.
The `targetRefs` field ensures that this filter is applied only to the `httpbin-waypoint` proxy.

```sh
kubectl apply -f -<<EOF
Expand Down Expand Up @@ -141,9 +141,10 @@ spec:
fillInterval: 300s
maxTokens: 10
tokensPerFill: 10
workloadSelector:
labels:
gateway.networking.k8s.io/gateway-name: httpbin-waypoint
targetRefs:
- kind: Gateway
group: gateway.networking.k8s.io
name: httpbin-waypoint
EOF
```

Expand Down Expand Up @@ -305,9 +306,10 @@ metadata:
name: filter-ratelimit
namespace: default
spec:
workloadSelector:
labels:
gateway.networking.k8s.io/gateway-name: httpbin-waypoint
targetRefs:
- kind: Gateway
group: gateway.networking.k8s.io
name: httpbin-waypoint
configPatches:
- applyTo: CLUSTER
match:
Expand Down Expand Up @@ -366,9 +368,10 @@ metadata:
name: filter-ratelimit-svc
namespace: default
spec:
workloadSelector:
labels:
gateway.networking.k8s.io/gateway-name: httpbin-waypoint
targetRefs:
- kind: Gateway
group: gateway.networking.k8s.io
name: httpbin-waypoint
configPatches:
- applyTo: VIRTUAL_HOST
match:
Expand Down