-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
Cannot stream logs from a pod #109
Comments
Hey there. Not surprised there's no answers to this yet, as I don't think the necessary features are there in this library atm: We only have streaming support hooked up to watch calls, and the internal Essentially we need to wire that up to a call that handles streaming correctly like |
Disclaimer: I've marked as good first issue but that's only really true if you are willing to dig through a bunch of async mechanics and feel you can understand What's needed:
History: #50 NB: Also not sure what to do with timeouts on this get request. Maybe client-go has some good behaviour for how long it keeps this open. Maybe it just streams it until it drops? There doesn't seem to be a timeout in |
Thanks for the reply! I’m glad that I’m not just missing in the library. I’m fairly dedicated to resolving this issue but it isn’t a high priority since it is for simple side project I’m working on. I’ll absolutely try and cobble something together. I’m new to rust and even newer to rust async but I may be able to figure something out with your response as guidance. Thanks again! |
Awesome, appreciate the initiative! Do feel free to prop up an unfinished PR. I can help out and leave comments pretty easily at least. |
I will take a look at the code and see if I can contribute this addition to the library. In fact, I may be interested in being a second maintainer (after I prove my chops ;) which may help elevate this client to beta status, which requires 2+ active maintainers. |
Definitely would be welcome. A lot to work on and think about here :-) |
I forked this and got it working last night. If no one has a PR coming up, ill have one by the end of the weekend if thats fine. I use this library a ton, and would be more then happy to start contributing to it. I just have to figure out the timeout situation. Ive ran it for 30 minutes and nothing has dropped yet. Ill leave it running a bit longer. I use the go client at my job I can see how it works under the hood no problem. |
That's awesome Eric! Yes, please submit your work! Very cool.
…On Fri, Jan 31, 2020 at 3:21 PM Eric McBride ***@***.***> wrote:
I forked this and got it working last night. If no one has a PR coming up,
ill have one by the end of the weekend if thats fine. I use this library a
ton, and would be more then happy to start contributing to it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#109>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAE7KZ5DFGBLFGLI2P3RXDRASB3PANCNFSM4KBXT45Q>
.
|
Awesome im going to clean up the code a bit, I added to the examples of how it works and such and will more then likely submit it tomorrow. |
Have taken @ericmcbride 's pr and tweaked it a bit to just re-expose the straight bytestream we get from the API, because I don't have a good solution to newline splitting that makes any sense to me. Published in kube 0.25.0 |
Wahoo! Thanks everyone for contributing to this! I’m excited to check it out! |
It looks like streaming/watching logs from a pod is part of this library. I only think that because the follow flag being part of the LogParams here https://github.com/clux/kube-rs/blob/master/src/api/raw.rs#L475
Note: I'm just learning rust and struggling with futures, but I'm going for it anyway.
I have basically the following code, but when I set the follow flag to true (commented out below) then I no longer receive any logs. I expected this because the future is never resolving. I found an
IntoStream
trait but I'm not sure how to use a stream with this data.Anyway, I've posted this question around the internet in a few places (https://stackoverflow.com/questions/59521539/converting-a-future-to-a-stream-in-kube-rs-library and https://www.reddit.com/r/learnrust/comments/eg49tx/help_with_futuresstreams_and_the_kubers_library/) but no answer yet. I'm curious if you might be able to help me out a little bit or even tell me if streaming logs is not supported at this time.
Finally: feel free to point me somewhere else if you know of a more appropriate place to post this question.
Thanks!
The text was updated successfully, but these errors were encountered: