Skip to content

Commit

Permalink
increase api service retry and note that even local services may not …
Browse files Browse the repository at this point in the history
…become available immediately
  • Loading branch information
cppforlife committed Jan 29, 2020
1 parent 7650382 commit 99f917f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/kapp/resources/resource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (g *ResourceTypesImpl) serverResources() ([]*metav1.APIResourceList, error)
var serverResources []*metav1.APIResourceList
var lastErr error

for i := 0; i < 5; i++ {
for i := 0; i < 10; i++ {
serverResources, lastErr = g.coreClient.Discovery().ServerResources()
if lastErr == nil {
return serverResources, nil
Expand All @@ -105,6 +105,7 @@ func (g *ResourceTypesImpl) serverResources() ([]*metav1.APIResourceList, error)
if len(serverResources) > 0 && g.opts.IgnoreFailingAPIServices {
return serverResources, nil
}
// Even local services may not be Available immediately, so retry
lastErr = fmt.Errorf("%s (possibly related issue: https://github.com/k14s/kapp/issues/12)", lastErr)
}
time.Sleep(1 * time.Second)
Expand Down

0 comments on commit 99f917f

Please sign in to comment.