Conversation
Hack / proof of concept fix for johanhaleby#67. Wrap the follow of an individual pod in a "while true" loop to keep monitoring a pod after it crashes and restarts. Probably breaks horribly if you try and use kubetail without follow.
|
Thanks @bryanlarsen for helping out! I'm a bit hesitant to accept this in its current state though. I'd really love to include something like this in kubetail but I'm not sure how to best achieve it.. I've actually made some attempts previously using named pipes (see here) but I was unable to get it working. My hope would be to get "named pipes" working and somehow run a kubetail process that watches for changes to pods matching the supplied criteria and if changes occur it should add the detected changes to the pipe. I.e. if I start kubetail with Are you familiar with any of this? If so would be feasible? |
|
Your approach certainly sounds a lot more capable than mine. Mine is only able to follow existing pods through a crash / restart cycle, yours can find new ones. Re: your original comment on your pipes issue, a quick Google found this https://unix.stackexchange.com/questions/146756/forward-sigterm-to-child-in-bash/444676#444676 . Dunno if that would help. Certainly if you can get your named pipes approach to work it's definitely better than my PR. OTOH, mine's pretty simple although it definitely cannot be applied as is -- I sent it more as a proof of concept. |
|
Thanks for the link. I actually tried again after you raised the issue but I couldn't get it working :/ But I'll check your link when I find time and try again :) I'm sure it must work somehow :) |
Hack / proof of concept fix for #67.
Wrap the follow of an individual pod in a "while true" loop to keep monitoring a pod after it crashes and restarts.
Probably breaks horribly if you try and use kubetail without follow.