obmarg / kazan

Kubernetes API client for Elixir
https://hex.pm/packages/kazan
MIT License
138 stars 35 forks source link

Getting Kubernetes Logs #50

Closed lswith closed 5 years ago

lswith commented 5 years ago

I'd love to use this library to stream from the kubernetes logs endpoint. This api is however, not in the swagger documentation.

obmarg commented 5 years ago

hey @lswith thanks for the report. Do you know which API this is done with if it's not in the swagger docs?

Without investigating at all I would have thought it was done with the normal read_namespaced_pod_logs endpoint, but with the follow option set to true so that it streams rather than just returning a response.

Pretty sure that Kazan wouldn't support this at present, because we wait for the end of the response before returning anything. It should be possible to write a function/module to deal with this though, similar to how the Watcher module handles streaming watches...

lswith commented 5 years ago

that's perfect actually. I'll use that endpoint.