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

improvement(k8s): ensure retries for most frequent kubectl calls #4749

Merged
merged 3 commits into from
Jul 5, 2023

Conversation

vvagaytsev
Copy link
Collaborator

@vvagaytsev vvagaytsev commented Jul 5, 2023

What this PR does / why we need it:
A follow-up PR for #4657. The original PR introduced an error message pattern to enable retries for k3s deployment errors. However, the retries didn't work because the deployment was done over the kubectl command instead of KubeApi.

This PR wraps the most frequently used kubectl calls into the retry machinery that is used in KubeApi. The retry settings are customized to avoid too-long retry intervals.

Which issue(s) this PR fixes:

Fixes #4460

Special notes for your reviewer:
See individual commits for details. Most of the changes are related to the dedicated refactoring commit 707d176.

I tested the fix twice with Google CloudShell and got no errors like in the original issue.

The retry machinery uses some build-in checks to avoid retriying on any error.
For `kubectl` custom `RetryOpts` are configured.
@vvagaytsev vvagaytsev requested a review from a team July 5, 2023 10:56
@vvagaytsev vvagaytsev marked this pull request as ready for review July 5, 2023 10:57
@vvagaytsev vvagaytsev merged commit 0477d8e into main Jul 5, 2023
@vvagaytsev vvagaytsev deleted the k3s-deploy-retry branch July 5, 2023 11:17
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.

0.13: [Bug]: quickstart-example, when run on k3s, fails on first deploy only
2 participants