Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@brandond
Copy link
Member

@brandond brandond commented Aug 26, 2025

Proposed Changes

Retry CRD creation in case of conflict

Also cleans up some of the server.Context factory creation stuff to eliminate unused code paths and avoid registering the Helm controller when helm is disabled.

As of fe465cc we no longer call NewContext outside pkg/server, so the isServer bool flag to use the supervisor kubeconfig and create an event recorder is unnecessary.

Types of Changes

bugfix
tech debt

Verification

See linked issue - this is difficult to reproduce due to tight timing; multiple control-plane nodes need to be at the exact same spot in the startup sequence at the exact same time.

Testing

Linked Issues

User-Facing Change

Further Comments

@brandond brandond requested a review from a team as a code owner August 26, 2025 00:07
@brandond brandond force-pushed the fix-crd-registration branch from 7df707b to ab80030 Compare August 26, 2025 04:15
@brandond brandond changed the title Only register CRDs on control-plane leader Retry CRD creation in case of conflict Aug 26, 2025
@brandond brandond force-pushed the fix-crd-registration branch from ab80030 to 0ea8c76 Compare August 26, 2025 04:20
Also cleans up some of the server.Context factory creation stuff to eliminate unused code paths and avoid registering the Helm controller when helm is disabled.

As of fe465cc we no longer call NewContext outside pkg/server, so the isServer bool flag to use the supervisor kubeconfig and create an event recorder is unnecessary.

Signed-off-by: Brad Davidson <[email protected]>
@brandond brandond force-pushed the fix-crd-registration branch from 0ea8c76 to a9fec4c Compare August 26, 2025 04:33
@codecov
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

❌ Patch coverage is 0% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.43%. Comparing base (0254ca3) to head (a9fec4c).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
pkg/server/context.go 0.00% 33 Missing ⚠️
pkg/server/server.go 0.00% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (0254ca3) and HEAD (a9fec4c). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (0254ca3) HEAD (a9fec4c)
e2etests 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #12814       +/-   ##
===========================================
- Coverage   40.66%   20.43%   -20.24%     
===========================================
  Files         185      182        -3     
  Lines       18916    18857       -59     
===========================================
- Hits         7693     3854     -3839     
- Misses      10049    14567     +4518     
+ Partials     1174      436      -738     
Flag Coverage Δ
e2etests ?
unittests 20.43% <0.00%> (-0.01%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@brandond brandond merged commit 068a013 into k3s-io:master Aug 26, 2025
54 checks passed
@brandond brandond changed the title Retry CRD creation in case of conflict Retry CRD creation in case of conflict Sep 8, 2025
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