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
217 stars 32 forks source link

Implement support for timestamps and since #66

Closed lpiepiora closed 10 months ago

lpiepiora commented 10 months ago

This PR implements the since and timestamps query parameters.

I have left the until not implemented, because the API version that the kubedoc reports does not support it, and also because that would require manual filtering of the logs, as the underlaying k8s API does not support it either.

This PR makes kubedoc to support this kind of use cases:

❯ DOCKER_HOST=localhost:2475 docker logs ea7cfd449f27 --timestamps --since=15s -n3
2023-12-21T14:41:16.669501622Z ok
2023-12-21T14:41:17.169580367Z ok
2023-12-21T14:41:17.669646665Z ok
lpiepiora commented 10 months ago

@joyrex2001 I've applied your remarks (hopefully ;)), thanks for the feedback

joyrex2001 commented 10 months ago

Thanks again, love the work you did 👍