Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(kuma-cp): traffic split with internal and external service #5904

Merged
merged 2 commits into from
Feb 6, 2023

Conversation

lobkovilya
Copy link
Contributor

Kuma configures RateLimit on the outbound side only when there is an external service with no egress. Since RateLimit is configured on the envoy.Route, Kuma created 2 separate envoy.Route for the internal/external split and this doesn't work properly.

In order to fix this we need to configure RateLimit for the destination in TrafficRoute even if one of the services in split doesn't have RateLimit.

For example, given the policy:

type: TrafficRoute
sources:
  - match:
      kuma.io/service: "*"
destinations:
  - match:
      kuma.io/service: service-WITH-rate-limit
conf:
  split:
    - weight: 50
      destination:
        kuma.io/service: service-WITH-rate-limit
    - weight: 50
      destination:
        kuma.io/service: service-WITHOUT-rate-limit

we should configure the rate limit on the envoy.Route with split, because original destination service-WITH-rate-limit has a rate limit.

Signed-off-by: Ilya Lobkov ilya.lobkov@konghq.com

Checklist prior to review

Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
@lobkovilya lobkovilya requested review from a team, Automaat and bartsmykla and removed request for a team February 2, 2023 16:18
Copy link
Contributor

@michaelbeaumont michaelbeaumont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does MeshRateLimit need to be fixed/updated too?

@lobkovilya
Copy link
Contributor Author

@michaelbeaumont I think no, we decided in MADR to support external services only when ZoneEgress is enabled. So we don't configure rate limit on the outbound side

@lobkovilya lobkovilya merged commit 5118d98 into kumahq:master Feb 6, 2023
@lobkovilya lobkovilya deleted the fix/tr-split-es branch February 6, 2023 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

e2e tests with traffic route mixing external and internal service
3 participants