k3s-io / k3s

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

Fix issue with k3s-etcd informers not starting #10047

Open brandond opened 2 weeks ago

brandond commented 2 weeks ago

Proposed Changes

Fix issue with k3s-etcd informers not starting

Start shared informer caches when k3s-etcd controller wins leader election. Previously, these were only started when the main k3s apiserver controller won an election. If the leaders ended up going to different nodes, some informers wouldn't be started

Types of Changes

bugfix

Verification

See linked issue

Testing

Linked Issues

User-Facing Change

Further Comments

codecov[bot] commented 2 weeks ago

Codecov Report

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

Project coverage is 43.55%. Comparing base (94e29e2) to head (6adc9ac). Report is 2 commits behind head on master.

Files Patch % Lines
pkg/etcd/etcd.go 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #10047 +/- ## ========================================== - Coverage 50.07% 43.55% -6.52% ========================================== Files 158 158 Lines 14032 14034 +2 ========================================== - Hits 7027 6113 -914 - Misses 5676 6756 +1080 + Partials 1329 1165 -164 ``` | [Flag](https://app.codecov.io/gh/k3s-io/k3s/pull/10047/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/10047/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io) | `36.43% <0.00%> (-10.15%)` | :arrow_down: | | [inttests](https://app.codecov.io/gh/k3s-io/k3s/pull/10047/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io) | `37.08% <0.00%> (-0.07%)` | :arrow_down: | | [unittests](https://app.codecov.io/gh/k3s-io/k3s/pull/10047/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io) | `16.58% <0.00%> (-0.01%)` | :arrow_down: | 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.