jetstack / kube-oidc-proxy

Reverse proxy to authenticate to managed Kubernetes API servers via OIDC.
https://jetstack.io
Apache License 2.0
477 stars 91 forks source link

Watching with client-go hangs #146

Closed ernoaapa closed 4 years ago

ernoaapa commented 4 years ago

Hi, I have Go CLI that watch CRD resources. For unknown reasons, it's unable to watch the resources.

This line in my go app, never return:

w, err := client.MyCustomResources("default").Watch(metav1.ListOptions{})

Should the watch be supported through the kube-oidc-proxy?

JoshVanL commented 4 years ago

Hi there!

Looks like my reply never got posted so I'll try again :neutral_face:

It looks like to me that you are finding the same problem as here. Watch requests often are not picked up by the httputil.ReverseProxy as long running connections and thus are not flushed immediately. To fix this, the default flush interval (previously never flushed) is now set to 50ms by default which can be configured.

This has now been merged and will be contained in v0.3.0 which I want to get released in the coming days.

JoshVanL commented 4 years ago

Should be now fixed.

/close

jetstack-bot commented 4 years ago

@JoshVanL: Closing this issue.

In response to [this](https://github.com/jetstack/kube-oidc-proxy/issues/146#issuecomment-668156758): >Should be now fixed. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.