apiVersion: kuadrant.io/v1 kind: RateLimitPolicy metadata: name: toystore-httproute spec: targetRef: group: gateway.networking.k8s.io kind: HTTPRoute name: toystore limits: "global": rates: - limit: 6 window: 30s "get-toy": when: - predicate: "request.method == 'GET'" - predicate: "request.path == '/toy'" rates: - limit: 5 window: 1m "admin-post-toy-per-user": rates: - limit: 2 window: 30s counters: - expression: "auth.identity.username" when: - predicate: "request.method == 'GET'" - predicate: "request.path == '/admin/toy'" - predicate: "auth.identity.group == 'admin'" "admin-delete-per-user": rates: - limit: 2 window: 30s counters: - expression: "auth.identity.username" when: - predicate: "request.method == 'DELETE'" - predicate: "request.path == '/admin/toy'" - predicate: "auth.identity.group == 'admin'"