Skip to content

Commit

Permalink
Merge pull request #1517 from CecileRobertMichon/add-io-timeout-err
Browse files Browse the repository at this point in the history
🏃 Add i/o timeout to retry errors to acquire kube client
  • Loading branch information
k8s-ci-robot committed Oct 10, 2019
2 parents 30869b7 + 5d9ee52 commit 7c427f9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func NewFromDefaultSearchPath(kubeconfigFile string, overrides tcmd.ConfigOverri
if err := util.PollImmediate(retryAcquireClient, timeoutAcquireClient, func() (_ bool, err error) {
c, err = clientcmd.NewControllerRuntimeClient(kubeconfigFile, overrides)
if err != nil {
if strings.Contains(err.Error(), io.EOF.Error()) || strings.Contains(err.Error(), "refused") || strings.Contains(err.Error(), "no such host") {
if strings.Contains(err.Error(), io.EOF.Error()) || strings.Contains(err.Error(), "refused") || strings.Contains(err.Error(), "no such host") || strings.Contains(err.Error(), "i/o timeout") {
// Connection was refused, probably because the API server is not ready yet.
klog.V(2).Infof("Waiting to acquire client... server not yet available: %v", err)
return false, nil
Expand Down

0 comments on commit 7c427f9

Please sign in to comment.