Skip to content

Commit

Permalink
Handle EOF in clusterctl kubectl apply (kubernetes-sigs#814)
Browse files Browse the repository at this point in the history
Signed-off-by: Vince Prignano <[email protected]>
  • Loading branch information
vincepri authored and k8s-ci-robot committed Mar 11, 2019
1 parent 4708f8e commit b59602c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package clusterclient

import (
"fmt"
"io"
"io/ioutil"
"net"
"os"
Expand Down Expand Up @@ -763,7 +764,7 @@ func (c *client) waitForKubectlApply(manifest string) error {
klog.V(2).Infof("Waiting for kubectl apply...")
err := c.kubectlApply(manifest)
if err != nil {
if strings.Contains(err.Error(), "refused") {
if err.Error() == io.EOF.Error() || strings.Contains(err.Error(), "refused") {
// Connection was refused, probably because the API server is not ready yet.
klog.V(4).Infof("Waiting for kubectl apply... server not yet available: %v", err)
return false, nil
Expand Down

0 comments on commit b59602c

Please sign in to comment.