[Backport release-1.34] Remove retry cap when waiting for Helm CRDs#7259
Merged
twz123 merged 1 commit intorelease-1.34from Mar 12, 2026
Merged
[Backport release-1.34] Remove retry cap when waiting for Helm CRDs#7259twz123 merged 1 commit intorelease-1.34from
twz123 merged 1 commit intorelease-1.34from
Conversation
The extensions controller component relies on the availability of the Helm CRD. The component's startup is delayed until the CRD becomes available. The availability check is repeated using retry-go, which defaults to ten attempts with an exponential backoff. Overall, this will usually bail out in under a minute, resulting in a k0s restart. This is problematic if it just takes longer for the CRD to become available. During initial cluster bootstrapping, the API server may receive a high volume of traffic, which takes time to process, especially for less powerful controllers. In these cases, k0s exits too early. Another example is a borked leader lease: client-go's leader election waits for at least the lease duration before trying to acquire an abandoned lease, even if the last renewal time was way in the past. In such situations, bailing out too early effectively causes k0s to enter a crash loop. Replace the capped retry/backoff with a context-cancellable endless loop that checks the CRD every two seconds, occasionally issues a log statement. See: 05f7867 ("Remove timeout from dynamic cluster config initializer") Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com> (cherry picked from commit 0cf4813) (cherry picked from commit 53079d3)
f219a74 to
d404cbb
Compare
ncopa
approved these changes
Mar 12, 2026
Contributor
Author
|
Successfully created backport PR for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated backport to
release-1.34, triggered by a label in #7252.See .