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

feat: support multiple backendRefs for HTTPRoute load-balancing #2402

Merged
merged 2 commits into from
Apr 11, 2022

Conversation

shaneutt
Copy link
Contributor

@shaneutt shaneutt commented Apr 7, 2022

What this PR does / why we need it:

This adds support for multiple backendRefs in HTTPRoute objects, enabling weighted load-balancing between multiple services for any specific routing rule.

Which issue this PR fixes

Resolves #2166

Notes:

Also running E2E tests for this: https://github.com/Kong/kubernetes-ingress-controller/actions/runs/2110253994 ✔️

PR Readiness Checklist:

  • the CHANGELOG.md release notes have been updated

@shaneutt shaneutt added area/feature New feature or request priority/medium area/gateway-api Relating to upstream Kubernetes SIG Networking Gateway API labels Apr 7, 2022
@shaneutt shaneutt added this to the Gateway API - Milestone 2 milestone Apr 7, 2022
@shaneutt shaneutt self-assigned this Apr 7, 2022
@shaneutt shaneutt temporarily deployed to Configure ci April 7, 2022 15:58 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 7, 2022 15:58 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 7, 2022 16:18 Inactive
@shaneutt shaneutt marked this pull request as ready for review April 7, 2022 16:21
@shaneutt shaneutt requested a review from a team as a code owner April 7, 2022 16:21
@shaneutt shaneutt temporarily deployed to Configure ci April 7, 2022 16:26 Inactive
@shaneutt shaneutt enabled auto-merge (rebase) April 7, 2022 16:41
Copy link
Contributor

@rainest rainest left a comment

Choose a reason for hiding this comment

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

I don't know how we solve the problem of allowing edits to Services' annotations after they've been used in a multi-backend route effectively outside an intentional stop the world or something stupid like designating a primary Service used as the sole source of truth. It's quite annoying to deal with.

CHANGELOG.md Outdated Show resolved Hide resolved
internal/dataplane/parser/ingressrules.go Outdated Show resolved Hide resolved
internal/dataplane/parser/ingressrules.go Show resolved Hide resolved
internal/dataplane/parser/parser.go Outdated Show resolved Hide resolved
internal/dataplane/parser/parser.go Outdated Show resolved Hide resolved
internal/dataplane/parser/parser.go Outdated Show resolved Hide resolved
internal/dataplane/parser/translate_httproute.go Outdated Show resolved Hide resolved
internal/dataplane/kongstate/util.go Outdated Show resolved Hide resolved
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 15:46 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 15:46 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 16:04 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 16:32 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 16:32 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 16:51 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 17:09 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 17:09 Inactive
@shaneutt shaneutt force-pushed the shaneutt/multiple-backendrefs branch from b1ca024 to 4c09144 Compare April 8, 2022 17:10
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 17:10 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 17:10 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 17:27 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 17:30 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 17:30 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 17:38 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 17:38 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 8, 2022 17:57 Inactive
@shaneutt shaneutt requested a review from rainest April 11, 2022 15:11
@shaneutt shaneutt force-pushed the shaneutt/multiple-backendrefs branch from b0f1fff to 5572595 Compare April 11, 2022 16:27
@shaneutt shaneutt temporarily deployed to Configure ci April 11, 2022 16:27 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 11, 2022 16:27 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 11, 2022 16:38 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 11, 2022 17:04 Inactive
@shaneutt shaneutt force-pushed the shaneutt/multiple-backendrefs branch from 25e9a14 to fea3203 Compare April 11, 2022 17:05
@shaneutt shaneutt temporarily deployed to Configure ci April 11, 2022 17:05 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 11, 2022 17:05 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci April 11, 2022 17:23 Inactive
@shaneutt shaneutt merged commit ab7a794 into main Apr 11, 2022
@shaneutt shaneutt deleted the shaneutt/multiple-backendrefs branch April 11, 2022 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/feature New feature or request area/gateway-api Relating to upstream Kubernetes SIG Networking Gateway API ci/license/unchanged priority/medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTPRoute - Multiple BackendRefs Support
2 participants