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
128 changes: 85 additions & 43 deletions test/e2e/testdata/local-ratelimit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ metadata:
namespace: gateway-conformance-infra
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: http-ratelimit-specific-user
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: http-ratelimit-specific-user
rateLimit:
type: Local
local:
rules:
- limit:
requests: 10
unit: Hour
- clientSelectors:
- headers:
- name: x-user-id
value: john
limit:
requests: 3
unit: Hour
- limit:
requests: 10
unit: Hour
- clientSelectors:
- headers:
- name: x-user-id
value: john
limit:
requests: 3
unit: Hour
---
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
Expand All @@ -30,16 +30,16 @@ metadata:
namespace: gateway-conformance-infra
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: http-ratelimit-all-traffic
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: http-ratelimit-all-traffic
rateLimit:
type: Local
local:
rules:
- limit:
requests: 3
unit: Hour
- limit:
requests: 3
unit: Hour
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
Expand All @@ -48,15 +48,15 @@ metadata:
namespace: gateway-conformance-infra
spec:
parentRefs:
- name: same-namespace
- name: same-namespace
rules:
- backendRefs:
- name: infra-backend-v1
port: 8080
matches:
- path:
type: Exact
value: /ratelimit-specific-user
- backendRefs:
- name: infra-backend-v1
port: 8080
matches:
- path:
type: Exact
value: /ratelimit-specific-user
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
Expand All @@ -65,15 +65,15 @@ metadata:
namespace: gateway-conformance-infra
spec:
parentRefs:
- name: same-namespace
- name: same-namespace
rules:
- backendRefs:
- name: infra-backend-v1
port: 8080
matches:
- path:
type: Exact
value: /ratelimit-all-traffic
- backendRefs:
- name: infra-backend-v1
port: 8080
matches:
- path:
type: Exact
value: /ratelimit-all-traffic
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
Expand All @@ -82,12 +82,54 @@ metadata:
namespace: gateway-conformance-infra
spec:
parentRefs:
- name: same-namespace
- name: same-namespace
rules:
- backendRefs:
- name: infra-backend-v1
port: 8080
matches:
- path:
type: Exact
value: /no-ratelimit
- backendRefs:
- name: infra-backend-v1
port: 8080
matches:
- path:
type: Exact
value: /no-ratelimit
---
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
name: ratelimit-invert-match
namespace: gateway-conformance-infra
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: http-ratelimit-invert-match
rateLimit:
type: Local
local:
rules:
- clientSelectors:
- headers:
- name: x-user-id
value: one
- name: x-org-id
value: test
invert: true
limit:
requests: 3
unit: Hour
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: http-ratelimit-invert-match
namespace: gateway-conformance-infra
spec:
parentRefs:
- name: same-namespace
rules:
- backendRefs:
- name: infra-backend-v1
port: 8080
matches:
- path:
type: Exact
value: /ratelimit-invert-match
41 changes: 0 additions & 41 deletions test/e2e/testdata/ratelimit-header-invert-match-local.yaml

This file was deleted.

Loading