In https://gitlab.com/gitlab-org/gitlab-ee/issues/12819, we discovered that the pod log feature doesn't work on pods with more than one container. As a short-term fix, we decided to show the first container by default. But, we should allow users to see all of the containers and to select which one they want to see the log for.
Intended users
Further details
Design proposal
After the user clicks through to a specific pod log from the environments page, they will now see a containers dropdown in addition to the environment and pod dropdowns:
Permissions and Security
Documentation
Testing
What does success look like, and how can we measure that?
I've added the proposed design into the issue description. Also looping @dhershkovitch in since he has joined since this comment was originally posted!
When we implemented the environment dropdown, we realized that we would ultimately need a searchable dropdown as the number of environments could be quite large. Presumably this is also the case for containers?
When we implemented the environment dropdown, we realized that we would ultimately need a searchable dropdown as the number of environments could be quite large. Presumably this is also the case for containers?
Yes, the number of containers is greater than the number of pods
Okay, great. So we'll likely need a searchable dropdown for containers, as well. I don't know if this can happen as a first pass or if we'll need to add a simple dropdown, much like we have for environments and pods, as a first pass and go back through and add a searchable dropdown as a second iteration. I'm guessing it would look odd for us to add a searchable dropdown for pods, when we haven't yet added a searchable dropdown for the other two yet. Perhaps we can go back through and update all of the dropdowns in one go?
@mrincon - you've worked on the previous issues, do you have a sense of the order in which this work should occur?
At some point we will need to make the drop-downs searchable as well. @jivanvl had more information from the frontend side. Do we need a new issue to track this as it is something separate from this issue.
We shouldn't need to open a new issue, we just need to figure out what's the dropdown component that rest of the frontend team uses, so we're not circling back and forth with the implementation when it reaches to reviewers/maintainers
So apparently we do have a component, but it's not currently available to be used outside of an internal GitLab feature, there's a gitlab-ui issue about porting that component to our component library so it can be used everywhere.
Should we grab that issue so we can include searchable dropdowns as part of our logging vision?
That seems like a great idea, @jivanvl. WDYT about adding this issue to our 12.6 list of work, @dhershkovitch and @adriel, so that we can utilize this dropdown variant for our log and metrics pages?
@ameliabauerly Looking at the gitlab-ui issue looks like the component functionality has been merged and it's only missing some styling, there's a merge request for that here: gitlab-ui!896 (merged)
I think if all goes well, we should be able to start working on adding those dropdowns to the logs feature fairly soon
Since I believe the design piece doesn't require additional discussion, I'll mark this workflow:ready for development. If that's incorrect, though, just let me know!
@dhershkovitch I think using the elasticsearch logs solution will solve this use case for users at #5696 (closed), should we keep this issue open for kubernetes API? Is this still relevant?
@mrincon - As far as I know, right now, people who don't utilize ES can only view the first container's logs. They have no way of switching between containers.
Regardless of how the list view off of Operations > Pod Logs develops for those who have ES enabled, those who don't have ES installed will still need to be able to switch between containers. Given this, it seems like this issue is still necessary so that those with only Kubernetes logs enabled can switch between containers. Unless I'm misunderstanding something? Definitely let me know if I am!
Overall, it seems like this is something we could do relatively easily that would pretty dramatically improve usability for those not using ES, so it seems like something we may as well move forward with?