Skip to content

Commit

Permalink
fix: add retry condition with kube-apiserver sent GOAWAY (argoproj#17422
Browse files Browse the repository at this point in the history
)

Signed-off-by: penglongli <[email protected]>
  • Loading branch information
penglongli authored and mkieweg committed Jun 11, 2024
1 parent 69f3d42 commit d3dacf0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions controller/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,14 @@ func isRetryableError(err error) bool {
isResourceQuotaConflictErr(err) ||
isTransientNetworkErr(err) ||
isExceededQuotaErr(err) ||
isHTTP2GoawayErr(err) ||
errors.Is(err, syscall.ECONNRESET)
}

func isHTTP2GoawayErr(err error) bool {
return strings.Contains(err.Error(), "http2: server sent GOAWAY and closed the connection")
}

func isExceededQuotaErr(err error) bool {
return kerrors.IsForbidden(err) && strings.Contains(err.Error(), "exceeded quota")
}
Expand Down

0 comments on commit d3dacf0

Please sign in to comment.