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

Implement exponential retry/backoff mechanism in k8s pod exec #125

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

nielstenboom
Copy link
Contributor

@nielstenboom nielstenboom commented Dec 21, 2023

Hey there!

We've internally been experiencing issues with the following two issues:

#103
#107

In this PR I attempted to tackle them both by;

  • Making sure the await from exec.exec is wrapped in a try/catch so UnhandledPromiseRejection errors should no longer occur to this
  • I've wrapped the call to k8s.Exec.exec() in an exponential backoff using this package. This should mitigate the rare HttpErrors sometimes being thrown from this function.

Typescript is not my main language so apologies if things are not entirely how they should be, did my best to add some proper tests for it 💪

Please please don't hesitate to make (major) edits to this PR! I'd be very happy if that would close these issues quicker 😄

Thanks!

closes #103
closes #107

@nielstenboom nielstenboom changed the title Implement exponential retry/backoff mechanism when talking to Kubernetes API Implement exponential retry/backoff mechanism in k8s pod exec Dec 21, 2023
@nielstenboom
Copy link
Contributor Author

@nikola-jokic would you have time to look at this soon? Thanks 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant