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

Extend global rate limit for sidecar #5

Closed zufardhiyaulhaq closed 2 years ago

zufardhiyaulhaq commented 2 years ago

Signed-off-by: zufardhiyaulhaq zufardhiyaulhaq@gmail.com

Summary

Extend global rate limit for sidecar

Type of Change

How has this been tested?

ratelimit $ k get globalratelimitconfig,globalratelimit,ratelimitservice
NAME                                                             AGE
globalratelimitconfig.ratelimit.zufardhiyaulhaq.com/echo-redis   100m

NAME                                                                 AGE
globalratelimit.ratelimit.zufardhiyaulhaq.com/echo-redis-http-8080   100m
globalratelimit.ratelimit.zufardhiyaulhaq.com/echo-redis-http-8081   100m

NAME                                                                          AGE
ratelimitservice.ratelimit.zufardhiyaulhaq.com/echo-redis-ratelimit-service   100m

root@examples-helloworld-v1-655db4f97b-jhcjv:/opt/microservices# curl echo-redis:8080/redis/hi -v
* Hostname was NOT found in DNS cache
*   Trying 10.32.185.200...
* Connected to echo-redis (10.32.185.200) port 8080 (#0)
> GET /redis/hi HTTP/1.1
> User-Agent: curl/7.38.0
> Host: echo-redis:8080
> Accept: */*
> 
< HTTP/1.1 429 Too Many Requests
< x-envoy-ratelimited: true
< date: Sun, 31 Oct 2021 08:03:15 GMT
* Server envoy is not blacklisted
< server: envoy
< content-length: 0
< x-envoy-upstream-service-time: 4
< 
* Connection #0 to host echo-redis left intact

Checklist:

zufardhiyaulhaq commented 2 years ago

close https://github.com/zufardhiyaulhaq/journals/issues/7