You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two different views for the logs: abstracted and "advanced devops" views. The abstracted view is 1) for the PaaS users to view logs from Porter's pre-defined template charts 2) "non-devops" application developers to see logs from custom charts that a mature organization would use.
The "advanced devops" view must show logs without any abstraction, in the style of typical k8s IDE's like Lens/Octant. This means logs from every pod is streamed regardless of its election status (i.e. primary or not). In the abstracted view, Porter must intelligently determine which pod in the chart output logs that are relevant - in the case of templates we provide, this is trivial. For custom charts, it requires a few opinionated rules to display logs in a generalizable way.
The logs from all pods, regardless of the type of their controller-parents, are displayed. (i.e. Deployment, StatefulSet, Job, DaemonSet)
Per each controller-parent, only the logs from the primary pod is displayed.
For pods with multiple containers, logs from all containers are collated with container's name as prefix (ex: [mongo-sidecar]
For most of the templates we provide, log display will simply have one panel for the primary pod from a Deployment or StatefulSet. Applying the above rules for a custom chart, however, means there can be multiple log panels per chart in the abstracted view.
note: get logs by finding pods with label chart={chart name} instead of using namespace and pod name. Stream logs from all pod replicas for abstracted view instead of just primary (showing logs from each "pod" is common with horizontally-scaling of most PaaS's like Heroku: https://www.heroku.com/dynos/scaling)
Stream live logs from pods within a chart using k8s go client informer
The text was updated successfully, but these errors were encountered: