zufardhiyaulhaq / istio-ratelimit-operator

Automatically create global & local rate limit in Istio, support EnvoyFilter versioning, ratelimit metrics, shadow mode, and ratelimit based on route!
MIT License
39 stars 9 forks source link

Adding support for descriptor_value for request_headers method #17

Closed rs324 closed 2 years ago

rs324 commented 2 years ago

Issue : https://github.com/zufardhiyaulhaq/istio-ratelimit-operator/issues/16

Summary

We need to add suppport for descriptor_value for request_headers method

Type of Change

Adding funcunallity

How has this been tested?

Deployed rate limit to my cluster with the following configuation.

image image

Checklist:

zufardhiyaulhaq commented 2 years ago

Thank you @rs324 for the contribution! appreciated! however, I don't see the descriptor value specification on

https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-ratelimit-action-requestheaders

can you try to test the curl with a different path? it's working or also getting rate limited?

zufardhiyaulhaq commented 2 years ago

You can use header_value_match instead

for example: https://github.com/zufardhiyaulhaq/istio-ratelimit-operator/blob/master/e2e/usecases/global.sidecar.headervaluematch/manifests/namespaces/development/ratelimit/globalratelimit.yaml

rs324 commented 2 years ago

Yes, I can verify its rate limit only the requested path and not the whole application even though it's not stated on the docs. Regarding the header_value_match, it felt like a much more complex configuration that should be handled for more advanced use cases. Thanks.