Skip to content

Retry all k8s API calls in the runner Kubernetes executor

Romuald Atchadé requested to merge retry-k8s-api-calls into main

What does this MR do?

When using the k8s executor, only the calls made to execute scripts remotely and stream logs are retry-able.

Other like, resources creation, are not. In this MR, we automatically retry some of those k8s API call when they fail with specific errors. The error triggering a retry are the following:

  • syscall.ECONNRESET
  • syscall.ECONNREFUSED
  • syscall.ECONNABORTED
  • syscall.EPIPE
  • io.ErrUnexpectedEOF
  • TLS handshake timeout
  • unexpected EOF

Why was this MR needed?

This MR automatically retries the k8s API call when one of the errors above is encountered

What's the best way to test this MR?

Pipeline passes should be sufficient

What are the relevant issue numbers?

close https://gitlab.com/gitlab-com/account-management/emea/julius-baer-bank/collaboration-project/-/issues/26 https://gitlab.com/gitlab-com/support/fieldnotes/-/issues/526

Edited by Romuald Atchadé

Merge request reports