in_kubernetes_events: support for net.* options including TCP keepalive settings#10487
Open
multi-io wants to merge 1 commit intofluent:masterfrom
Open
in_kubernetes_events: support for net.* options including TCP keepalive settings#10487multi-io wants to merge 1 commit intofluent:masterfrom
multi-io wants to merge 1 commit intofluent:masterfrom
Conversation
including TCP keepalive Signed-off-by: Olaf Klischat <olaf.klischat@gmail.com>
0699d1b to
5036307
Compare
Author
|
Anything I can do here? I'm not sure what the failed test does, but I don't think it's caused by the PR change. |
edsiper
requested changes
Jul 8, 2025
| @@ -218,7 +221,7 @@ struct k8s_events *k8s_events_conf_create(struct flb_input_instance *ins) | |||
| flb_plg_info(ctx->ins, "API server: %s", ctx->kube_url); | |||
|
|
|||
Member
There was a problem hiding this comment.
I think something like this is necessary:
https://github.com/fluent/fluent-bit/blob/master/src/flb_input.c#L2126C5-L2126C27
Author
There was a problem hiding this comment.
You mean I need to call this? No other plugin calls it, afaics. Is this the reason why the test fails? This isn't caused by the PR change, right?
Member
There was a problem hiding this comment.
Yes, this is used in the in_event_test plugin here:
https://github.com/fluent/fluent-bit/blob/master/plugins/in_event_test/event_test.c#L331
the goal is to use the unified interface because it also make sure to cover the threaded vs no threaded mode
Member
|
ping |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support
net.*options including TCP keepalive settings in thekubernetes_eventspluginThis allows the user to set net.* options in the
kubernetes_eventsinput plugin config. This is particularly useful for configuring TCP keepalive settings becausekubernetes_eventsopens a watch on the Kubernetes API, which is a long-running connection that might see long periods of inactivity during which intermediate networking infrastructure like proxies might drop the connection silently. The Go K8s client sends keepalives automatically, e.g.kubectl get event -w(which opens a watch on k8s events similar to thekubernetes_eventsplugin) will send keepalives every 30s without the user having to configure anything (those will be HTTP/2 pings rather than raw zero-length TCP keepalives, but serves the same purpose).Testing
Before we can approve your change; please submit the following in a comment:
Sample config:
tcpdump extract:
Other config: Longer timeout (120s) to test reconnect
tcpdump:
As a consequence, fluent-bit recreates the connection and catches up on the events that might have happened in the meantime: