Implement Logs view for k8s dashboard
Description
As a first step towards Environment logs and events streaming visualisa... (&13793 - closed) we should implement the logs view. See the epic for the designs.
Technical proposal
API
It seems we have everything to display k8s pods logs in the UI. The logs can be accesses by the following API request:
GET /-/k8s-proxy/api/v1/namespaces/<namespace>/pods/<pod-name>/log?follow=true
GET /-/k8s-proxy/api/v1/namespaces/<namespace>/pods/<pod-name>/log?container=<container-name>&follow=true
Note that follow=true query parameter uses the same long polling connection as ?watch=true for getting k8s resource status and thus will be terminated in about 5 minutes.
We can get container name from pods response: data.items[0].spec.containers
UI
We can draw inspiration from JobLog component. Maybe we can even extract some common parts for it. Since I presume, that going from an overview view to a logs view and back could be a common user journey, we should make sure we are able to navigate to the logs view without a full page refresh. We already have a vue router integrated for environment details page, so that should not be a problem.