k3s-io / k3s

Lightweight Kubernetes
https://k3s.io
Apache License 2.0
26.62k stars 2.24k forks source link

[release-1.27] Make /db/info available anonymously from localhost #10003

Closed brandond closed 3 weeks ago

brandond commented 3 weeks ago

Proposed Changes

The Rancher CAPR planner apparently queries this anonymously to get the IP address of the first etcd node (to be used as the init node), instead of just using the address of the first node with the etcd label.

K3s itself uses auth when retrieving this resource, but since Rancher does not we need to make it available anonymously again - at least from localhost.

Types of Changes

integration/ bugfix

Verification

Testing

Linked Issues

Further Comments

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 22.72727% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 36.18%. Comparing base (b721a3e) to head (141e98c).

Files Patch % Lines
pkg/etcd/etcd.go 0.00% 9 Missing :warning:
pkg/server/auth/auth.go 11.11% 8 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## release-1.27 #10003 +/- ## ================================================ - Coverage 43.10% 36.18% -6.93% ================================================ Files 158 155 -3 Lines 16287 13784 -2503 ================================================ - Hits 7021 4988 -2033 + Misses 8023 7818 -205 + Partials 1243 978 -265 ``` | [Flag](https://app.codecov.io/gh/k3s-io/k3s/pull/10003/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io) | Coverage Δ | | |---|---|---| | [e2etests](https://app.codecov.io/gh/k3s-io/k3s/pull/10003/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io) | `36.18% <22.72%> (-10.13%)` | :arrow_down: | | [unittests](https://app.codecov.io/gh/k3s-io/k3s/pull/10003/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

brandond commented 3 weeks ago

virtualbox image for btrfs test appears to be broken; merging