From d54846c676ea4780563c1966181ec168deedef14 Mon Sep 17 00:00:00 2001 From: dlaw4608 Date: Wed, 8 May 2024 17:13:55 +0100 Subject: [PATCH] Added rate limit policys for both gateways --- hack/topology_setup.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/hack/topology_setup.sh b/hack/topology_setup.sh index ac90cea8f..4220f3219 100755 --- a/hack/topology_setup.sh +++ b/hack/topology_setup.sh @@ -123,6 +123,44 @@ spec: - name: toystore port: 80 +--- + +apiVersion: kuadrant.io/v1beta2 +kind: RateLimitPolicy +metadata: + name: paying-customer-rate-limit + namespace: istio-system +spec: + targetRef: + group: gateway.networking.k8s.io + kind: Gateway + name: paying-customer-gw + limits: + "high-priority": + rates: + - limit: 100 + duration: 1 + unit: second + +--- + +apiVersion: kuadrant.io/v1beta2 +kind: RateLimitPolicy +metadata: + name: free-tier-rate-limit + namespace: istio-system +spec: + targetRef: + group: gateway.networking.k8s.io + kind: Gateway + name: free-tier-gw + limits: + "low-priority": + rates: + - limit: 10 + duration: 1 + unit: second + EOF }