Skip to content

Commit

Permalink
fix timeout (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
enrichman authored Dec 5, 2024
1 parent 72b2a5f commit acd9d96
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cli/cmds/cluster/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,19 +188,17 @@ func create(clx *cli.Context) error {

logrus.Infof("waiting for cluster to be available..")

// retry every 5s for at most 2m
// retry every 5s for at most 2m, or 25 times
availableBackoff := wait.Backoff{
Duration: 5 * time.Second,
Cap: 2 * time.Minute,
Steps: 25,
}

var kubeconfig []byte
if err := retry.OnError(availableBackoff, apierrors.IsNotFound, func() error {
kubeconfig, err = cfg.Extract(ctx, ctrlClient, cluster, host[0])
if err != nil {
return err
}
return nil
return err
}); err != nil {
return err
}
Expand Down

0 comments on commit acd9d96

Please sign in to comment.