Skip to content

Commit

Permalink
Merge pull request #8507 from rajatjindal/fix-watch-timeout-error
Browse files Browse the repository at this point in the history
fix watch error due to elb/proxy timeout
  • Loading branch information
Matthew Fisher committed Aug 14, 2020
2 parents 273d036 + 4faeedd commit bb33b92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/kube/client.go
Expand Up @@ -35,6 +35,7 @@ import (

"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
Expand Down Expand Up @@ -478,7 +479,7 @@ func (c *Client) watchUntilReady(timeout time.Duration, info *resource.Info) err

ctx, cancel := watchtools.ContextWithOptionalTimeout(context.Background(), timeout)
defer cancel()
_, err = watchtools.ListWatchUntil(ctx, lw, func(e watch.Event) (bool, error) {
_, err = watchtools.UntilWithSync(ctx, lw, &unstructured.Unstructured{}, nil, func(e watch.Event) (bool, error) {
// Make sure the incoming object is versioned as we use unstructured
// objects when we build manifests
obj := convertWithMapper(e.Object, info.Mapping)
Expand Down

0 comments on commit bb33b92

Please sign in to comment.