From 4f827383b73069d3c72c54a6f5c9219674067ec5 Mon Sep 17 00:00:00 2001 From: Jon Torre <78599298+JTorreG@users.noreply.github.com> Date: Thu, 25 Sep 2025 17:11:40 +0100 Subject: [PATCH] docs: Update rate limit policy conditions explanation Clarified the conditions for rate limiting in policies, specifying that conditions are optional and detailing the behavior of default policies. --- content/nic/configuration/policy-resource.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/nic/configuration/policy-resource.md b/content/nic/configuration/policy-resource.md index d92a3894e..3a79ec019 100644 --- a/content/nic/configuration/policy-resource.md +++ b/content/nic/configuration/policy-resource.md @@ -180,10 +180,10 @@ condition: |``variables`` | defines a Variable condition to rate limit against. | [ratelimit.condition.variables](#ratelimitconditionvariables) | No | |``default`` | sets the rate limit in this policy to be the default if no conditions are met. In a group of policies with the same condition, only one policy can be the default. | ``bool`` | No | {{% /table %}} -{{< call-out "note" >}} - -One condition of type `jwt` or `variables` is required. Each Policy supports only one condition. +{{< call-out "note" >}} +Conditions (`jwt` or `variables`) are optional, but each policy can only have one. +If conditions are used, a request doesn't match any, and a `default` has been defined, the `default` policy applies. Otherwise, if no `default` is set, the request isn't rate limited. {{< /call-out >}} The rate limit policy with condition is designed to be used in combination with one or more rate limit policies. For example, multiple rate limit policies with [RateLimit.Condition.JWT](#ratelimitconditionjwt) can be used to apply different tiers of rate limit based on the value of a JWT claim. For a practical example of tiered rate limiting by the value of a JWT claim, see the example in our [GitHub repository](https://github.com/nginx/kubernetes-ingress/tree/v{{< nic-version >}}/examples/custom-resources/rate-limit-tiered-jwt-claim/README.md).