-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
Panic when using watcher
with a resource that does not expose a resourceVersion
#1092
Comments
I believe metrics-server is using an extension API, so I'm not sure they support watches at all. That said, we should definitely at least have clearer error messages for this, and avoid panicking... |
I've hit this wall too, watch is not supported: /~https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/1013-metrics-watch-api Polling is the only alternative AFAIK |
In that case should probably extend |
Closes #1092 Signed-off-by: clux <sszynrae@gmail.com>
Quick PR in #1101 to turn the unwrap into an error. This will cause a repeating error when watch is not supported though, but hopefully it's more informative and a developer can catch/notice this earlier and be less confused about it than if it was an unwrap. |
We may also want to add a |
* Gracefully error in watcher when kinds do not support watch Closes #1092 Signed-off-by: clux <sszynrae@gmail.com> * Update kube-runtime/src/watcher.rs Co-authored-by: teozkr <teo.roijezon@stackable.de> Signed-off-by: Eirik A <sszynrae@gmail.com> Signed-off-by: clux <sszynrae@gmail.com> Signed-off-by: Eirik A <sszynrae@gmail.com> Co-authored-by: teozkr <teo.roijezon@stackable.de>
Current and expected behavior
See title. The offending line is here.
Possible solution
No response
Additional context
metrics-server apparently creates PodMetrics resources without this field, and my code panics when trying to watch them.
Environment
Configuration and features
No response
Affected crates
kube-runtime
Would you like to work on fixing this bug?
No response
The text was updated successfully, but these errors were encountered: