I would like to update the conditional-rate-limit to be based on a match of the URL in the request.
I found these docs, https://istio.io/docs/reference/config/policy-and-telemetry/istio.policy.v1beta1/#Rule
But can't track down what the correct attribute would be to use
As a guess, I tried
apiVersion: config.istio.io/v1alpha2
kind: rule
metadata:
name: quota
namespace: istio-system
spec:
match: match(request.uri, "/A/B/93*") == true
actions:
- handler: handler.memquota
instances:
- requestcount.quota
But that errors with
Unable to compile match condition expression: 'unknown attribute request.uri', rule='quota.rule.istio-system',
enter code here
Thanks, Brent
I think if you change from request.uri to request.path, things should start working for you.
Here's the set of supported attributes: https://istio.io/docs/reference/config/policy-and-telemetry/attribute-vocabulary/
I hope this helps
Rate limit configuration is split into two parts.
Client Side Mixer Side
Run the following command to enable rate limits using memquota:
$ kubectl apply -f samples/bookinfo/policy/mixer-rule-productpage-ratelimit.yaml
See the attached link[1] for enabling Rate Limits.
[1]https://istio.io/docs/tasks/policy-enforcement/rate-limiting/