-
Notifications
You must be signed in to change notification settings - Fork 52
Implement curl KeepAlive for watch connections #275
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
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hirishh The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Unfortunately, all of this code is generated, which means that the next time we regenerate, this change will be overridden. The right place to fix this is in the generator itself: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.h.mustache They've generally been really good about merging PRs relatively quickly. Once the generator is updated, we can regenerate the code to pick up the change. Sorry for the complexity, but generated code is the only way we can keep up with the very large surface area of the Kubernetes API. |
I also suspect that they won't accept the |
Thank you for the information. I will try to do a PR there. Honestly, I believe there is no need to do a check like "isWatchCall". Activating the keepalive has no consequences for normal calls. |
If the upstream code generator is ok to merge it without the check, we'll pick it up from there. Thanks! (and apologies again for the complication) |
Hello,
I've implemented a simple way to enable keepalive as suggested in #202 (comment)
I'm activating it only if "watch=1" is passed as queryParameters and keepalive is enabled in the clientApi configuration.
If you want this to be different, please advice, and I will change the implementation.
I've tested it with
watch_list_pod
example and using wireshark:Best,
hirishh