AS a catalyst API user
GIVEN I have set a user api token
AND I have created a new mediawiki environment (with id 2) which is still starting
WHEN I GET /api/environments/2/logs?stream=mediawiki/install-mediawiki
THEN I receive a 200 OK with with all of the logs of install-mediawiki up to this point
AND I receive line by line new logs as the are generated
AND the connection closes when the container has stopped
- Trying to stream a container that does not exist returns a 404
- If someone tries to hit this endpoint after the container has stopped, it should just return the whole logs as plaintext and then close the connection
Notes:
- the kubernetes go client supports streaming logs
- it is set as a log option before invoking the client
- you can likely use gin c.Stream to stream the logs