gloo-mesh
gloo-mesh copied to clipboard
Using RateLimitClientConfig does not create an EnvoyFilter with uniqueValue descriptor
Gloo Mesh Version
1.2.x (latest stable)
Istio Version
1.11.x
Describe the bug
With GMG, you apply a client ratelimit using raw
and it works. However, when using the same configuration with RateLimitClientConfig
the rate limit is not applied.
Steps to reproduce the bug
With a GlooMesh installation and a minimum of 1 remote cluster:
- Install bookinfo application to test
- From the attached compress file, apply the
VirtualHost
and theRateLimitServerConfig
resources. Notice that that the VHost has the rate limit client configuration asraw
- Check in the remote cluster the generated EnvoyFilter that there are 3
actions
. It should look like this:
patch:
operation: MERGE
value:
route:
rateLimits:
- actions:
- genericKey:
descriptorValue: gloo-mesh.rl-config
- genericKey:
descriptorValue: solo.setDescriptor.uniqueValue
- genericKey:
descriptorValue: count
- Verify the ratelimit is working trying to reach the application more than 5 times. A
429
error should be returned - Now, apply the
RateLimitClientConfig
resource from the attached zip file. It contains the same rate limit rule than in theraw
- Comment out the
raw
block in the VHost resource and point to the just appliedRateLimitClientConfig
:
options:
rateLimit:
# raw:
# rateLimits:
# - setActions:
# - genericKey:
# descriptorValue: count
ratelimitClientConfigRef:
name: default-ratelimit-client-config
namespace: gloo-mesh
ratelimitServerConfigSelector:
namespaces:
- gloo-mesh
- Check the generated
EnvoyFilter
in the remote cluster. Now there are only twoactions
:
patch:
operation: MERGE
value:
route:
rateLimits:
- actions:
- genericKey:
descriptorValue: gloo-mesh.rl-config
- genericKey:
descriptorValue: count
stage: 1
The descriptorValue: solo.setDescriptor.uniqueValue
is missing.
7. Try to reach the application more than 5 times. And the rate limit is never triggered.
Thank you
Expected Behavior
When I apply a RateLimitClientConfig
, it will work as same as with raw
in the VHost.
The RateLimit is, therefore, triggered.