joyrex2001 / kubedock

Kubedock is a minimal implementation of the docker api that will orchestrate containers on a Kubernetes cluster, rather than running containers locally.
MIT License
226 stars 33 forks source link

Implement tail on ContainerLogs #65

Closed lpiepiora closed 11 months ago

lpiepiora commented 11 months ago

I hit a problem that, when using testcontainers-rs, and waiting for a specific message to appear in the logs, the container would never become ready.

The problem is related to the fact that the if a container produces a lot of lines, the actual line could have appeared before the last 100 lines that are returned, this PR implements the handling of the tail parameter.

If the parameter is non numeric, all is assumed, otherwise a number is assumed. If negative all is returned (as per spec).

joyrex2001 commented 11 months ago

Thanks!