bug: ratelimit: error when applying ratelimit local rate descriptor limit is not a multiple of token bucket fill timer
#1634
Labels
area/api-gateway
Issues or PRs related to api-gateway
kind/bug
Categorizes issue or PR as related to a bug.
Milestone
When I deploy RateLimit CR with the following configuration I get an error:
Local rate limit configuration is not applied, but in the status CR reports that rate limit is
Ready
.When user applies RateLimit CR, where any descriptor's fill interval is not a multiplication of default bucket fill interval defined in rate limit, validation should result in an error.
The error comes directly from envoy. https://github.com/envoyproxy/envoy/blob/main/source/extensions/filters/common/local_ratelimit/local_ratelimit_impl.cc#L221-L224
Also in Envoy docs it's stated that:
We need to cover that exception in validation, or parse any exception directly from Envoy and reflect that in resource status.
Steps to reproduce
Deploy httpbin, expose it and deploy APIRule:
Apply the following RateLimit CR:
Check the logs of Istio-proxy sidecar in httpbin workload:
kubectl logs -n test httpbin istio-proxy
/kind bug
/area api-gateway
The text was updated successfully, but these errors were encountered: