-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
KubernetesClient does not use sendInitialEvents
for watching
#5368
Comments
sendInitialEvents
for watching
That is correct the client is currently ignorant of sendInitialEvents. However this does not match the behavior of what you are describing - this is an alpha feature that requries a feature gate and sending sendIntialEvents=true to get the initial events. What kubernetes server are you testing against? Related to #5081 |
Oh, didn't know that, I just saw the flag and the fact that I was getting an initial list of all resources 😅 I'm just using plain vanilla k8s without any feature gate, installed via kubeadm This even happens on a 1.25.8 cluster |
If you leave the resourceVersion unpopulated or set to 0, then you will be sent the full state as add events https://kubernetes.io/docs/reference/using-api/api-concepts/#semantics-for-watch Only if you start the watch at a particular resourceVersion will they be omitted. |
Ah, I see, then I misunderstood that flag 😅 This can be closed then, thanks for the quick response! |
If you don't mind, I'll reopen this to actually add support for sendInitialEvents and at least resourceVersionMatch - I'll need that later in any case for #5081 |
Describe the bug
I'm watching a resource like
but I still receive the initial events and looking at the code here and here I don't see any usage of
sendInitialEvents
.Fabric8 Kubernetes Client version
6.8.0
Steps to reproduce
Look at the code or step through a minimal code snippet to see that the option is never used.
Expected behavior
The option is appended to the URL so I don't get the initial events.
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
other (please specify in additional context)
Environment
Linux
Fabric8 Kubernetes Client Logs
No response
Additional context
k8s version; 1.27.4
The text was updated successfully, but these errors were encountered: