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.29] Rework loadbalancer server selection logic #11459

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:39
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.71%. Comparing base (20ea4f3) to head (91896a4).
Report is 15 commits behind head on release-1.29.

Files with missing lines Patch % Lines
pkg/agent/loadbalancer/servers.go 83.45% 41 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/cli/token/token.go 0.00% 1 Missing ⚠️
pkg/cluster/address_controller.go 88.88% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.29   #11459      +/-   ##
================================================
- Coverage         46.78%   42.71%   -4.08%     
================================================
  Files               179      181       +2     
  Lines             18721    18904     +183     
================================================
- Hits               8758     8074     -684     
- Misses             8612     9640    +1028     
+ Partials           1351     1190     -161     
Flag Coverage Δ
e2etests 35.31% <63.74%> (-6.89%) ⬇️
inttests 18.74% <20.84%> (-16.03%) ⬇️
unittests 14.17% <52.36%> (+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 75b6304 into k3s-io:release-1.29 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