Skip to content

Commit

Permalink
Create command every retry
Browse files Browse the repository at this point in the history
  • Loading branch information
concaf committed Jul 21, 2020
1 parent 4531b40 commit c3723f2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/addons/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,9 @@ func enableOrDisableAddonInternal(cc *config.ClusterConfig, addon *assets.Addon,
}
}

command := kubectlCommand(cc, deployFiles, enable)

// Retry, because sometimes we race against an apiserver restart
apply := func() error {
_, err := cmd.RunCmd(command)
_, err := cmd.RunCmd(kubectlCommand(cc, deployFiles, enable))
if err != nil {
glog.Warningf("apply failed, will retry: %v", err)
}
Expand Down

0 comments on commit c3723f2

Please sign in to comment.