From d7d515caf0a0329fa4020cbe86fc1c617e12454e Mon Sep 17 00:00:00 2001 From: craig Date: Thu, 10 Oct 2024 15:06:07 +0100 Subject: [PATCH] find and replace v1beta2 rlp Signed-off-by: craig rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED --- .../toystore/ratelimitpolicy_gateway.yaml | 24 +++++------ .../toystore/ratelimitpolicy_httproute.yaml | 40 +++++++++++++++++-- 2 files changed, 49 insertions(+), 15 deletions(-) diff --git a/examples/toystore/ratelimitpolicy_gateway.yaml b/examples/toystore/ratelimitpolicy_gateway.yaml index 5635c163a..a37342f34 100644 --- a/examples/toystore/ratelimitpolicy_gateway.yaml +++ b/examples/toystore/ratelimitpolicy_gateway.yaml @@ -11,20 +11,20 @@ spec: limits: "expensive-operation": rates: - - limit: 2 - duration: 30 - unit: second + - limit: 2 + duration: 30 + unit: second when: - - selector: request.method - operator: eq - value: POST + - selector: request.method + operator: eq + value: POST "limit-per-ip": rates: - - limit: 5 - duration: 30 - unit: second + - limit: 5 + duration: 30 + unit: second when: - - selector: source.ip - operator: eq - value: source.address + - selector: source.ip + operator: eq + value: source.address diff --git a/examples/toystore/ratelimitpolicy_httproute.yaml b/examples/toystore/ratelimitpolicy_httproute.yaml index eeb6c732b..e118ecb85 100644 --- a/examples/toystore/ratelimitpolicy_httproute.yaml +++ b/examples/toystore/ratelimitpolicy_httproute.yaml @@ -10,9 +10,16 @@ spec: limits: "global": rates: +<<<<<<< HEAD - limit: 6 duration: 30 unit: second +======= + - limit: 6 + duration: 30 + unit: second + +>>>>>>> 8996d6dd (find and replace v1beta2 rlp) "get-toy": when: - selector: request.method @@ -22,15 +29,24 @@ spec: operator: eq value: "/toy" rates: +<<<<<<< HEAD - limit: 5 duration: 30 unit: second "admin-post-toy-per-user": +======= + - limit: 5 + duration: 30 + unit: second + + "admin-post-or-delete-toy-per-user": +>>>>>>> 8996d6dd (find and replace v1beta2 rlp) rates: - - limit: 2 - duration: 30 - unit: second + - limit: 2 + duration: 30 + unit: second counters: +<<<<<<< HEAD - metadata.filter_metadata.envoy\.filters\.http\.ext_authz.username when: - selector: request.method @@ -59,3 +75,21 @@ spec: - selector: metadata.filter_metadata.envoy\.filters\.http\.ext_authz.admin operator: eq value: "true" +======= + - metadata.filter_metadata.envoy\.filters\.http\.ext_authz.username + routeSelectors: + - matches: + - path: + type: Exact + value: "/admin/toy" + method: POST + - matches: + - path: + type: Exact + value: "/admin/toy" + method: DELETE + when: + - selector: metadata.filter_metadata.envoy\.filters\.http\.ext_authz.admin + operator: eq + value: "true" +>>>>>>> 8996d6dd (find and replace v1beta2 rlp)