Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send keep-alive probes every 30 seconds to the server #630

Merged
merged 3 commits into from
Apr 7, 2021

Conversation

bacongobbler
Copy link
Contributor

@bacongobbler bacongobbler commented Apr 7, 2021

This sends keep-alive probes to the server every 30 seconds, similar to client-go. This should help in samples such as the watch example, as now a keepalive header should be sent by the client to keep the connection open.

Note that this option will apply to only watch requests. Kubernetes' client-go sets this up during the construction of the transport.New with a given client config, so I think theirs applies to all requests:

https://github.com/kubernetes/client-go/blob/f6ce18ae578c8cca64d14ab9687824d9e1305a67/transport/transport.go#L46-L53

https://github.com/kubernetes/client-go/blob/f6ce18ae578c8cca64d14ab9687824d9e1305a67/transport/cache.go#L90-L96

It is possible that alternative features like the Log with the follow option enabled might need this flag as well.

Signed-off-by: Matthew Fisher matt.fisher@microsoft.com

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 7, 2021
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 7, 2021
@bacongobbler bacongobbler changed the title apply forever: true to requests send keep-alive probes every 30 seconds to the server Apr 7, 2021
This fix sends keep-alive probes to the server every 30 seconds.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 7, 2021
Matthew Fisher added 2 commits April 7, 2021 13:10
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
@bacongobbler
Copy link
Contributor Author

bacongobbler commented Apr 7, 2021

Pushing up the lint fixes now and it should be ready for testing.

@brendandburns
Copy link
Contributor

/lgtm
/approve

Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 7, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bacongobbler, brendandburns

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 7, 2021
@k8s-ci-robot k8s-ci-robot merged commit f4aed6f into kubernetes-client:master Apr 7, 2021
@bacongobbler bacongobbler deleted the keepalive branch April 7, 2021 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants