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

[release-1.31] Rework loadbalancer server selection logic #11457

Merged

Conversation

brandond
Copy link
Member

Proposed Changes

Types of Changes

backport; tech debt; enhancement

Verification

See linked PR for verifiable changes

Testing

Linked Issues

User-Facing Change

The embedded client loadbalancer that handles connectivity to control-plane elements has been extensively reworked for improved performance, reliability, and observability.

Further Comments

None of these fields or functions are used in k3s or rke2

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit f2f57b4)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 13e9113)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
…rivate

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 67fd5fa)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 95797c4)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 911ee19)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 3d2fabb)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 71918e0)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 168b344)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
…watch fails

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c7ff957)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 81dda9d)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
The error message should be printf style, not just concatenated. The
current message is garbled if the command or result contains things that
look like formatting directives:

`Internal error occurred: error sending request: Post "https://10.10.10.102:10250/exec/default/volume-test/volume-test?command=sh&command=-c&command=echo+local-path-test+%!!(MISSING)E(MISSING)+%!!(MISSING)F(MISSING)data%!!(MISSING)F(MISSING)test&error=1&output=1": proxy error from 127.0.0.1:6443 while dialing 10.10.10.102:10250, code 502: 502 Bad Gateway`

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 45195e2)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e9cf3a7)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Fix issue where rke2 tunnel was trying to connect to apiserver port instead of supervisor

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5a5b136)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Add flags supervisor and apiserver ports and bind address so that we can add an e2e to cover supervisor and apiserver on separate ports, as used by rke2

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e143e0f)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@brandond brandond requested a review from a team as a code owner December 10, 2024 19:27
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

Attention: Patch coverage is 79.50963% with 117 lines in your changes missing coverage. Please review.

Project coverage is 42.87%. Comparing base (d28a780) to head (d1aa856).
Report is 14 commits behind head on release-1.31.

Files with missing lines Patch % Lines
pkg/agent/loadbalancer/servers.go 83.81% 40 Missing and 5 partials ⚠️
pkg/etcd/etcdproxy.go 0.00% 19 Missing ⚠️
pkg/agent/loadbalancer/loadbalancer.go 74.50% 8 Missing and 5 partials ⚠️
pkg/agent/tunnel/tunnel.go 82.66% 10 Missing and 3 partials ⚠️
pkg/server/router.go 85.18% 5 Missing and 3 partials ⚠️
pkg/agent/loadbalancer/httpproxy.go 80.00% 5 Missing and 2 partials ⚠️
pkg/agent/config/config.go 63.63% 3 Missing and 1 partial ⚠️
pkg/util/client.go 66.66% 2 Missing and 1 partial ⚠️
pkg/agent/proxy/apiproxy.go 66.66% 1 Missing ⚠️
pkg/cli/token/token.go 0.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.31   #11457      +/-   ##
================================================
- Coverage         47.21%   42.87%   -4.35%     
================================================
  Files               179      181       +2     
  Lines             18569    18752     +183     
================================================
- Hits               8767     8039     -728     
- Misses             8459     9524    +1065     
+ Partials           1343     1189     -154     
Flag Coverage Δ
e2etests 35.07% <63.57%> (-7.23%) ⬇️
inttests 18.73% <20.84%> (-15.96%) ⬇️
unittests 14.30% <52.53%> (+0.44%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brandond brandond merged commit 1ac966b into k3s-io:release-1.31 Dec 11, 2024
30 checks passed
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.

3 participants